-
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
Entity updates not persisted when using the repository pattern #6945
Comments
@danielpetisme An other solution is to tell hibernate to use the field via |
I confirm using getters/setters do the job with Repository. I have to admit I have been naive on this one..
My 2cts, it would worth to add a classic POJO before the repository snippet with a comment like "if the entity does not inherit Note: I tested the |
@danielpetisme I review the documentation of Hibernate with Panache in the following PR : #6923 It's strange that Let's keep this one open untill the rework on the documentation is done. |
Fixes quarkusio#6135 and quarkusio#6945 WIP Apply suggestions from code review will be squashed later Co-Authored-By: Georgios Andrianakis <[email protected]>
Describe the bug
When using the repository pattern, the entity changes are not commited to the database.
Expected behavior
The entity should be managed thus changes tracked and persisted to the DB.
Actual behavior
To Reproduce
Steps to reproduce the behavior:
mvn compile test
You'll find 2 entities:
Fruit
standard entityPerson
a Panache entityBoth entities have a REST Resource layer and a Test to verify the creation and the update.
For the
Fruit
I use the repository pattern and for thePerson
the panache facilities.The result of the tests are:
FruitResourceTest#testCreateFruit
: ✅FruitResourceTest#testUpdateFruit
: ❌PersonResourceTest#testCreatePerson
: ✅PersonResourceTest#testUpdatePerson
: ✅Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:java -version
:1.2.0.Final
Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: