Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mulltimap update bug [SPR-15263] #19828

Closed
spring-projects-issues opened this issue Feb 16, 2017 · 2 comments
Closed

Mulltimap update bug [SPR-15263] #19828

spring-projects-issues opened this issue Feb 16, 2017 · 2 comments
Labels
in: data status: invalid

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Feb 16, 2017

Sergey Kovalenko opened SPR-15263 and commented

I'm mapping multimap in Hibernate:

  • it works fine with pure Hibernate;
  • it behaves strangely when I use Hibernate along with Spring.

There are 2 situations:

  1. 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).
  2. 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.


Attachments:

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Feb 17, 2017

Juergen Hoeller commented

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?

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage in: data and removed type: bug labels Jan 11, 2019
@bclozel
Copy link
Member

@bclozel bclozel commented Feb 18, 2022

Closing as we never got feedback from the reporter.

@bclozel bclozel closed this as completed Feb 18, 2022
@bclozel bclozel added status: invalid and removed status: waiting-for-triage labels Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: invalid
Projects
None yet
Development

No branches or pull requests

2 participants