-->
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: Mapping collection of collections
PostPosted: Thu Jul 28, 2005 3:39 am 
Regular
Regular

Joined: Fri Dec 17, 2004 10:38 am
Posts: 54
I have simple collection of collection like:

Code:
class MyClass {
  private List<List<Object>> list;

  // setters and getters

  public void addElement(int index, Object element) {
    list.get(index).add(element);
  }

  public Object getElement(int index1, int index2) {
    return list.get(index1).get(index2);
  }
}


how can i map this collection using hibernate?

Thank you!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 11:40 am 
Regular
Regular

Joined: Fri Dec 17, 2004 10:38 am
Posts: 54
i think the simple way is to do it via intermediate class (or <component>) which holds collection reference. but is there a way to do it in "standard" hibernate way?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 29, 2005 1:28 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
No, maybe using a usercollectiontype.

_________________
Emmanuel


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.