-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem with StatelessSession and Distinct_root
PostPosted: Tue Jan 05, 2010 2:55 pm 
Beginner
Beginner

Joined: Fri Dec 04, 2009 9:37 am
Posts: 34
Hello,

I want to query my results via StatelessSession and the following code does not ensure distinct root entity...
Each entity are as much available as rows are available for it. (JOIN FETCH used in query)

org.hibernate.Query query= session.statelessSession.createQuery( queryStr ).setResultTransformer( Criteria.DISTINCT_ROOT_ENTITY ) ;
businessObjects = query.list().iterator();

Question : How can I set an join fetch query to distinct root entity ?

.. The is an "order by Object" in the sql which is execuited on the dbms..

If somebody knows it before me. Be faster here ;)

Greats & Regards !


Top
 Profile  
 
 Post subject: Re: Problem with StatelessSession and Distinct_root
PostPosted: Wed Jan 06, 2010 11:34 am 
Beginner
Beginner

Joined: Fri Dec 04, 2009 9:37 am
Posts: 34
Hm.. It must be an error in my DB2Dialect or some else. I saw a fix for scrollable.next() in this dialect and i will report of course my sollution .
On Mysql everything is working..


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

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.