-->
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: Complicated Query, dont know how to do it.
PostPosted: Thu Nov 16, 2006 3:03 pm 
Newbie

Joined: Mon Nov 06, 2006 4:58 am
Posts: 4
Hi everybody,

following question:

I have a persitent class called TRACK
TRACK includes an Attribute called "ContentSet" (many to one), see TRACK:

Code:
..
   <class name="com.nuromobile.accounting.DomainObjects.Track"
      table="track">
..
      <many-to-one name="contentSet"></many-to-one>
..



A ContentSet has a List of ContentItems (many to many):

Code:
..
   <class name="com.nuromobile.accounting.DomainObjects.ContentSet"
      table="content_set">
..
      <list name="Items" table="sets_items">
         <key column="set_id" />
         <list-index column="ind" />
         <many-to-many column="item_id"
            class="com.nuromobile.accounting.DomainObjects.ContentItem" />
      </list>





Code:
    <class name="com.nuromobile.accounting.DomainObjects.ContentItem" table="content_item">
..
      <many-to-one name="contentProducer"></many-to-one>
..


Each ContentItem has a Content-Producer, the one who created the Item(many-to-one).
My problem is that i dont know how to select the following:

"Give me all Items of ContentSets, which are in the Track-Table and which have the Content-Producer X"

I thought about it a long time but i dont know how to do it?

I am thankfulkl for any advice.

[/code]


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.