-->
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: Doubt in hibernate query language
PostPosted: Tue Nov 27, 2007 8:37 am 
Newbie

Joined: Tue Nov 27, 2007 7:53 am
Posts: 5
Hi,
I have the following query

from DMSViewRowObject dmView where dmView.rowType=310 and dmView.index2=3 and dmView.index1 = (select dv.index1 from DMSViewRowObject dv where dv.data2= :publicID)

here my inner sub query returns multiple results.Hence using it this way would throw a sql exception.

but if i try doing like this i.e using limit 1

from DMSViewRowObject dmView where dmView.rowType=310 and dmView.index2=3 and dmView.index1 = (select dv.index1 from DMSViewRowObject dv where dv.data2= :publicID limit 1)

I get hibernate query exception.

I know a way using sql query but is there any other way out.


looking forward to your help


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.