Associated collection deleted after loading in byte-enhanced entities

Description

I use load-time weaving to enhance my entities and in the latest version of 5.1 (5.1.5) I noticed that some data was being lost due to hibernate issuing a collection deletion after a simple collection getter usage. Problematic in this specific case as it was user permissions.
I encountered the same problem some versions ago but it got fixed in the meantime, sadly I don't remember which one exactly though.

I tried to distill my use case as much as I could and attached a test case for it. The test still uses spring boot but hope it helps nevertheless.

edit - tested with hibernate 5.2, last working version was 5.2.7 (updated affected versions)

Environment

Spring Boot 1.3.8, Spring JPA, Hibernate 4.1.5

Activity

Show:
Luis Barreiro
April 3, 2017, 6:22 PM

Can you please confirm that its still an issue with latest from master ?

We recently fix the handling of unfetched collections, in particular

Mario Martinho Dias
April 3, 2017, 8:46 PM

Can confirm that it's not an issue in latest snapshot of 5.1.6 and 5.2.10, thanks!

Assignee

Unassigned

Reporter

Mario Martinho Dias

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.1.4
5.2.7

Affects versions

Priority

Major
Configure