Announcement Announcement Module
No announcement yet.
Bag / Set Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bag / Set

    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??

  • #2
    "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.