PDA

View Full Version : Bag / Set



ribeirete
Sep 7th, 2004, 08:22 AM
When I have to use some object's data collection like Bag or Set in hibernate I have to stay inside a hibernate's session

When I use object of type Set I have a corresponding in Java, but when I have to use a Bag object I don't know which type object I could use with Spring...

My question is: how can I to use objects of type Bag in Spring??

Rod Johnson
Sep 7th, 2004, 09:18 AM
"Bag" defines Hibernate semantics, not a type. From the Hibernate reference manual:


Hibernate can persist instances of java.util.Map, java.util.Set, java.util.SortedMap, java.util.SortedSet, java.util.List, and any array of persistent entities or values. Properties of type java.util.Collection or java.util.List may also be persisted with "bag" semantics.