-->
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: The Criteria API
PostPosted: Mon Mar 29, 2004 10:30 am 
Newbie

Joined: Mon Mar 29, 2004 9:56 am
Posts: 1
Hello,

I've got some problem using the criteria API.
I can't manage to execute this simple SQL statement:

Code:
select *
from A
join A_B  ab1 on (ab1.ida = a.id)
join A_B  ab2 on (ab2.ida = a.id)
join B on (B.id = ab1.idb)
where ab1.idb = '193609' and ab2.idb = '193662'


The schema have 3 tables

Code:
Table A         
         id
Table B
         id
Table A_B
         ida
         idb       


i have create a mapping with a many-to-many relation like this in the A.hbm.xml file:

Code:
<set name="array" table="A_B">
         <key column="ida"/>
         <many-to-many column="idb" class="B"/>
</set>


It is possible to manage this query with the criteria API ??

Ludo


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.