HI,
i need to get the list of masterTable entries that satisfy a criteria in child table. I am following the following approach.
Code:
List list =
getHibernateTemplate().find("from masterTable where childTableSet like ? ", tempSet );
childTableSet : is of type HashSet
I get the following exception:
Code:
org.springframework.orm.hibernate3.HibernateQueryException: Expected positional parameter count: 1, actual parameters: [[com.company.package.model.businessobject.childTable@47b708]] [from MasterTable where childTableSet like ? ]; nested exception is org.hibernate.QueryException: Expected positional parameter count: 1, actual parameters: [[com.sierra.intranet.model.businessobject.SaEmployeeLeaveStatus@47b708]] [from SaLeaveCategoryMaster where saEmployeeLeaveStatusSet like ? ]
Caused by: org.hibernate.QueryException: Expected positional parameter count: 1, actual parameters: [[com.sierra.intranet.model.businessobject.SaEmployeeLeaveStatus@47b708]] [from SaLeaveCategoryMaster where saEmployeeLeaveStatusSet like ? ]
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:319)
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:275)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:75)
at org.springframework.orm.hibernate3.HibernateTemplate$31.doInHibernate(HibernateTemplate.java:853)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:844)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
any quick help???
the master is connected to the child by one-to many maping.[/code]