-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: problem in find by example
PostPosted: Tue Jul 24, 2007 8:57 am 
Newbie

Joined: Tue Jul 03, 2007 11:09 am
Posts: 14
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]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.