-->
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: Associate objects via a Map of Sets
PostPosted: Mon Aug 29, 2005 9:45 pm 
Newbie

Joined: Mon Aug 29, 2005 9:37 pm
Posts: 2
Location: Sydney, Australia
Hi,

Does anyone know how to associate, in Hibernate, to two classes via a map of sets:

SortedMap<key,SortedSet>

I have searched the forums and read all the Hibernate doco, but could not find such a thing explained.

To give some context:

Code:

+----------+      has       +------+   departs from   +---------+
|DealBundle|----------------| Deal |------------------| Airport |
+----------+ 1         0..* +------+ 1              1 +---------+
                                |1                         | 1
                                |       arrives at         |
                                +--------------------------+


I have an object, call it a DealBundle, which has a whole lot of Deal objects. The Deal objects are kept in multiple SortedSets which in turn are in a Map keyed by the departure Airport object.

Code:
public class DealBundle {

   public long    id;
   
   public SortedMap<Airport,SortedSet<Deal>>
             dealsByDepartureAirport;
}

public class Deal {

   public long    id;
   public Airport departureAirport;
   public Airport arrivalAirport;
   public float   totalPrice;
}

public class Airport {

   public long    id;
   public String  IATACode;
   public String  name;
}


I will appreciate any and every bit advice,
Thanks,
Evan


Top
 Profile  
 
 Post subject: Map of Sets
PostPosted: Mon Sep 05, 2005 10:49 am 
Newbie

Joined: Sun Oct 03, 2004 9:00 am
Posts: 7
I have the same problem. I want to use a map of sets. Can somebody help me/us ??

Thanx
Muhammad Aamir


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 7:09 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
collections of collections is not supported.
Collection of entities containing a collections is supported

_________________
Emmanuel


Top
 Profile  
 
 Post subject: thanks - i though this may be the case
PostPosted: Sat Sep 24, 2005 11:47 pm 
Newbie

Joined: Mon Aug 29, 2005 9:37 pm
Posts: 2
Location: Sydney, Australia
i thought this may be the case
thanks,
evan.


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.