Trying to manage some collection on an entity, I found that my setter don't set correctly the collection. I ask on some forums without finding why this behavior happen.
[Stack overflow post|https://stackoverflow.com/questions/54761884/calling-clear-on-a-jpa-entity-property-using-accesstype-property-fails/54769007?noredirect=1#comment96537854_54769007]
[Hibernate post|https://discourse.hibernate.org/t/accesstype-property-and-setter-problem-on-map/2320/3]
I made several tests and I'm here: - the setter in my example must set the collection and when the persist method is call it recreate the entity and then call the setter. But some strange things happen and during its execution the argument map is emptied (juste after the call to clear) - Some people gave me advices about the good practices for manipulate collections, but I think this case is not concerned with this.
I create a test case that reproduce the issue: https://github.com/Mohicane/jpa-accesstype/tree/master/ gedaccesstypetest accesstype.property.testcase |
|