-->
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: Map with list as value
PostPosted: Sat Dec 22, 2007 12:18 pm 
Newbie

Joined: Mon Dec 17, 2007 11:50 am
Posts: 14
Hi,

is there a possibility to persist the following attribute:

<Edge, List<MyClass>> with Hibernate?

Thanks


Top
 Profile  
 
 Post subject: Re: Map with list as value
PostPosted: Mon Dec 24, 2007 12:17 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
burnt wrote:
Hi,

is there a possibility to persist the following attribute:

<Edge, List<MyClass>> with Hibernate?

Thanks


Isn't this a SomeParent (one-to-many) Edges (one-to-many) MyClass relationship? Then you could use a <map ...> with a <map-key-many-to-many ...> for Edges and a <many-to-many ....> for values. I have never tried it myself but I guess it will work. Look at section 6.2 of the documentation if you need to know more about this.


Farzad-


Top
 Profile  
 
 Post subject: How does it work with annotations?
PostPosted: Sun Jan 06, 2008 1:00 pm 
Newbie

Joined: Mon Dec 17, 2007 11:50 am
Posts: 14
Sorry, I did not mention that I use annotations. How can this be done with annotations?


Top
 Profile  
 
 Post subject: Re: How does it work with annotations?
PostPosted: Mon Jan 07, 2008 1:46 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
burnt wrote:
Sorry, I did not mention that I use annotations. How can this be done with annotations?


I believe there are annotation equivalents. Take a look at section 2.4.6.2.2 of hibernate annotations' document.



Farzad-


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.