-->
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.  [ 2 posts ] 
Author Message
 Post subject: Help ManyToMany with attributes
PostPosted: Tue Aug 24, 2010 12:08 pm 
Newbie

Joined: Tue Aug 24, 2010 11:37 am
Posts: 2
Hi guys
I need implements this using hibernate annotation:
Code:
CLASS A  --------------------- CLASS B
                     |
                  CLASS C

values :
Code:
     class C    class A    class B
      date       A_FK      B_FK 
  01/10/2010     a1          b1 
  02/10/2010     a1          b1 
  03/10/2010     a1          b1

but when I enter all dates in the DB looks like this:
Code:
   date         A_FK      B_FK 
  03/10/2010     a1          b1 

How I can implements this using hibernate annotation and @Embedded?
Thanks.


Top
 Profile  
 
 Post subject: Re: Help ManyToMany with attributes
PostPosted: Wed Aug 25, 2010 8:01 pm 
Newbie

Joined: Tue Aug 24, 2010 11:37 am
Posts: 2
My friends,
I need help. How I can develop it using hibernate annotation ?
Code:
public class Project(){
    private Long id ;
}

public class Item(){
    private Long id ;
}

Where relationship...
Example:
Code:
class relationship class Project    class Item
  01/10/2010          id1               id1 
  02/10/2010          id1               id1 
  03/10/2010          id1               id1
  01/10/2010          id2               id1
  01/10/2010          id1               id2


One Item 1 with the date '01/10/2010' , '02/10/2010' and '03/10/2010' for the Project 1 and the itself Item 1 with the date '01/10/2010' for the Project 2.vice versa.
thanks.


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