Inconsistent @Parent behavior if cache is enabled

Description

For a @Cacheable parent entity that embeds a child embeddable with a @Parent attribute, the parent attribute is correctly initialized if cached is not enabled, and is null if cache is enabled.

Worked in 5.6.15.

Broken with 6.0.2, 6.1.7, 6.2.6.

hibernate-test-case-templates use-case is coming.

Activity

Show:

Laurent AlmerasJune 30, 2023 at 4:41 PM

Here is a minimal test-case : https://github.com/lalmeras/hibernate-test-case-templates/commit/50f46ec94d1a6af7a7d099d64026aec4b0004197

# tests: 2/2 OK mvn -f hibernate-orm-5/ test # tests: 1 OK, 1 failure mvn -f hibernate-orm-6/ test # tests: 1 OK, 1 failure mvn -f hibernate-orm-6/ test -Dversion.org.hibernate=6.1.7.Final # tests: 1 OK, 1 failure mvn -f hibernate-orm-6/ test -Dversion.org.hibernate=6.0.2.Final
Fixed

Details

Assignee

Reporter

Worked in

Components

Sprint

Fix versions

Affects versions

Priority

Created June 30, 2023 at 4:28 PM
Updated August 31, 2023 at 5:30 PM
Resolved August 7, 2023 at 9:59 AM