Hi,
Does anyone know how to associate, in Hibernate, to two classes via a map of
sets:
SortedMap<key,SortedSet>
I have serached the forums and read all the Hibernate doco, but could not find
such a thing explained.
To give some context:
| +----------+ 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.
| 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 long IATACode;
| public long name;
| }
|
I will appreciate any and every bit advice here because I am at a loss.
Cheers,
Evan
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3892174#3892174
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3892174
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user