-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Hibernate does not load lazy onetone entity attributes with activated batching #10722
Labels
area/hibernate-orm
Hibernate ORM
area/persistence
OBSOLETE, DO NOT USE
kind/bug
Something isn't working
Milestone
Comments
quarkusbot
added
area/hibernate-orm
Hibernate ORM
area/persistence
OBSOLETE, DO NOT USE
labels
Jul 14, 2020
@dreab8 could you check this out please? |
@Sanne sure |
Apparently the bug is triggered when combining Enhanced Proxies with the Unfortunately Enhanced Proxies had only been tested in combination with the ORM default, we'll fix this in Hibernate. |
Sanne
changed the title
Hibernate does not load lazy onetone entitiy attributes with activated batching
Hibernate does not load lazy onetone entity attributes with activated batching
Jul 19, 2020
dreab8
added a commit
to dreab8/quarkus
that referenced
this issue
Jul 27, 2020
dreab8
added a commit
to dreab8/quarkus
that referenced
this issue
Jul 28, 2020
dreab8
added a commit
to dreab8/quarkus
that referenced
this issue
Jul 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/hibernate-orm
Hibernate ORM
area/persistence
OBSOLETE, DO NOT USE
kind/bug
Something isn't working
Describe the bug
My entity has a lazy onetoone relationship to a child entity.
Attributes of the child entity are not read. They are kept null.
Eager onetoone work as expected.
After some debugging, I figured out that batching is the problem.
I removed
quarkus.hibernate-orm.batch-fetch-size=100
from my configuration, and my child is loaded correctly.Expected behavior
Attributes of my lazy loaded child onetone entity should get loaded.
Batching should work in all cases.
Actual behavior
Attributes of entities in a OneToOne relationship do not get loaded. They are null.
Any eager loaded onetone gets loaded correctly, with all attributes.
To Reproduce
Steps to reproduce the behavior:
hibernate-lazy-one-to-one.zip
mvn clean compile quarkus:dev
inside thehibernate-lazy-one-to-one
directory.quarkus.hibernate-orm.batch-fetch-size
from the application.properties. Do everything again starting from step 3. Name now does get loaded correctly.Configuration
Environment (please complete the following information):
uname -a
orver
:MSYS_NT-10.0 NANB7NLNVP2 2.10.0(0.325/5/3) 2018-06-13 23:34 x86_64 Msys
1.6.0.Final
mvnw --version
orgradlew --version
):Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\eclipse\tools\apache-maven\bin..
Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: C:\eclipse\tools\zulu11.39.15-ca-jdk11.0.7-win_x64
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
The text was updated successfully, but these errors were encountered: