-->
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.  [ 3 posts ] 
Author Message
 Post subject: How do I do that in Hibernate (JOIN etc)?
PostPosted: Fri Nov 24, 2006 9:48 am 
Newbie

Joined: Thu Nov 23, 2006 11:08 am
Posts: 14
hi, i have this sql string here:

SELECT p.produktnavn, k.knavn FROM produkt p JOIN (produktkategori pk, kategori k) ON (p.id=pk.produktid AND pk.kategoriid=k.id) JOIN (produktfarge pf, farge f) ON (p.id=pf.produktid AND pf.fargeid=f.id) where k.id = '1164113247767' and p.pris between 0 and 5000 and f.id = '1164113248104';


how can i do that in hibernate? i have three classes that are connected with that called FargeData, ProduktData and KategoriData...any idea? you may find a pic of the ER model here: http://jicoma.com/forum/screenshot.png

thanks in advance :-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 7:09 am 
Newbie

Joined: Thu Nov 23, 2006 11:08 am
Posts: 14
no ideas ? :-|


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 7:39 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
Let us know what type of query you would like to use:

- HQL
- EJB-QL?
- Criteria Query?
- Native SQL?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.