I've just made some tests with a very simple entity:
- one long id
- one final list of string
- setters and getters
I define Access(AccessType.PROPERTY) on the entity. I build an entity and save it controlling the class of the list: My final list still be the one I build, hibernate use the setter to initialize the
In the process of persisting a collection, Hibernate wraps the actual collection in an implementation of PersistentCollection, in this case PersistentMap, then substitutes that collection in the entity with the wrapped collection by calling the property setter.
So it's not right when you say that hibernate wraps my map. I miss something? |