it behaves strangely when I use Hibernate along with Spring.
There are 2 situations:
I save a non-empty multimap (I add 'this' element1 to the multimap), then add element2 to the multimap and update, after that the multimap contains element2 and element1 (which is fine).
I save an empty multimap, then add element2 to the multimap and update, after that the multimap is empty (but I expect to see element2 in the multimap).
In the first situation, during update in function flushCollections(..)
!attach1.png|thumbnail!
I get ce.doupdate = true
!attach2.png|thumbnail!
In situation 2, I get doupdate = false
!attach3.png|thumbnail!
I’ve tried using different Spring’s versions: 4.0.5.RELEASE, 4.2.2.RELEASE, 4.3.6.RELEASE.
You can find it in attachments,
situation 1: if you uncomment mmapl.put(-10, this) in Some’s constructor;
situation 2: if you comment mmapl.put(-10, this) in Some’s constructor.
Spring isn't involved with user custom type handling at all. I suspect that the difference in behavior comes from using transactions with Hibernate, no matter whether triggered by Spring or with manual begin/commit calls. So when you're saying it works fine with "pure Hibernate", could you please double-check that the setup is equivalent, i.e. including transactions?
Sergey Kovalenko opened SPR-15263 and commented
I'm mapping multimap in Hibernate:
There are 2 situations:
In the first situation, during update in function flushCollections(..)
!attach1.png|thumbnail!
I get ce.doupdate = true
!attach2.png|thumbnail!
In situation 2, I get doupdate = false
!attach3.png|thumbnail!
I’ve tried using different Spring’s versions: 4.0.5.RELEASE, 4.2.2.RELEASE, 4.3.6.RELEASE.
You can find it in attachments,
situation 1: if you uncomment mmapl.put(-10, this) in Some’s constructor;
situation 2: if you comment mmapl.put(-10, this) in Some’s constructor.
Attachments:
The text was updated successfully, but these errors were encountered: