-->
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.  [ 4 posts ] 
Author Message
 Post subject: Abfrage realisieren
PostPosted: Sat Aug 04, 2007 6:32 am 
Newbie

Joined: Sat Aug 04, 2007 6:26 am
Posts: 4
Ich habe folgendes Schemata:

A - one to many - B
B - one to many - C

Wie kann ich eine H. Query bauen die mir nur Daten aus A zurückliefert, wenn es in C zu B welche gibt. Also so was in SQL:

select c.id from category as c where c.id in (select cat_id from tournament as t inner join wette as w on t.id like w.tournament_id )


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 05, 2007 2:19 pm 
Newbie

Joined: Wed Jun 13, 2007 11:36 am
Posts: 5
Ist sowas gemeint?

Code:
select distinct c
  from Category c
       inner join c.tournaments t
       inner join t.wetten


Top
 Profile  
 
 Post subject: ja
PostPosted: Fri Nov 02, 2007 11:12 am 
Newbie

Joined: Sat Aug 04, 2007 6:26 am
Posts: 4
warum muss man eigentlich distinct verwenden?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 02, 2007 3:57 pm 
Regular
Regular

Joined: Tue Jan 03, 2006 9:20 am
Posts: 74
Sonst konnten mehrere gleiche Records retourniert werden.


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