Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2008, 04:20 PM
Member
 
Join Date: Dec 2008
Posts: 1
Rep Power: 0
stunaz is on a distinguished road
Default Hibernate Criteria
Hello every one, can someone could help me?
i have a problem while doing a sub query: here is the script :

DetachedCriteria subInfo = DetachedCriteria.forClass(ActReg.class)
.createAlias("ActType", "t")
.createAlias("Incident", "i")
.add(Restrictions.eq("t.Id", 158))
.setProjection(Projections.property("i.Id"));


Criteria critInfo = session.createCriteria(IncData.class)
.add(Restrictions.between("DateLogged",st_date,end _date))
.add(Subqueries.in("Id",subInfo));

the output is : java.lang.String cannot be cast to java.lang.Integer

Thank you for any help
Bookmark Post in Technorati
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
new to hibernate ajhansiprasad Advanced Java 2 11-06-2008 06:20 AM
Criteria instance - II JavaForums Java Blogs 0 08-31-2008 03:30 PM
Criteria instance - I JavaForums Java Blogs 0 08-31-2008 03:30 PM
Hibernate DAO sundarjothi Eclipse 0 04-26-2008 09:29 AM
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1 Heather Database 2 06-30-2007 04:01 PM


All times are GMT +2. The time now is 09:18 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org