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

Support for JPA entity listeners, including in native mode #20708

Merged
merged 9 commits into from
Oct 28, 2021

Conversation

yrodiere
Copy link
Member

Fixes #12740, #6948 (the two top issues of the Hibernate ORM extension at the moment, by number of votes).

Creating this PR as draft, since we will need hibernate/hibernate-orm#4296 to be merged and released upstream before we can merge this PR.

Alternatively, we could just drop the last commit, use reflection at runtime in the native application, and it would work without any change in Hibernate ORM. But that would have to be temporary; personally I'd rather wait until the next Hibernate ORM release, which shouldn't take too long anyway.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I added a very minor comment. I agree we should wait for the ORM fix.

Can you make sure the tests are added after you made it work (it might just be GitHub order not being right)?

@yrodiere yrodiere force-pushed the i6948-entitylistener-cdi branch from f68a237 to 5407188 Compare October 13, 2021 08:35
@yrodiere
Copy link
Member Author

yrodiere commented Oct 13, 2021

Thanks @gsmet , I addressed your comments. Let's wait for hibernate/hibernate-orm#4296 to get merged and released.

@yrodiere yrodiere force-pushed the i6948-entitylistener-cdi branch from 7a14c80 to 487d19b Compare October 14, 2021 10:52
@yrodiere
Copy link
Member Author

I forgot to address and test orm.xml mappings... I just added that. We'll need a few more fixes in Hibernate ORM, though:

@yrodiere
Copy link
Member Author

I just confirmed locally that tests pass if we rebase on #21036. I'll mark this as non-draft as soon as #21036 gets merged.

@yrodiere yrodiere force-pushed the i6948-entitylistener-cdi branch from 2abb843 to b9893a5 Compare October 27, 2021 17:13
@yrodiere yrodiere marked this pull request as ready for review October 27, 2021 17:13
@yrodiere yrodiere added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 27, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 27, 2021

This workflow status is outdated as a new workflow run has been triggered.

🚫 This workflow run has been cancelled.

Failing Jobs - Building b9893a5

⚠️ Artifacts of the workflow run were not available thus the report misses some details.

Status Name Step Failures Logs Raw logs
Attach pull request number ⚠️ Check → Logs Raw logs
CI Sanity Check ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 27, 2021

Failing Jobs - Building b9893a5

Status Name Step Failures Logs Raw logs
Native Tests - Windows - hibernate-validator Build Failures Logs Raw logs

Failures

⚙️ Native Tests - Windows - hibernate-validator #

- Failing: integration-tests/hibernate-validator 

📦 integration-tests/hibernate-validator

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-hibernate-validator: Failed to build quarkus application

@yrodiere
Copy link
Member Author

The failure is on a native build of integration tests for Hibernate Validator on Windows. It's unrelated to this PR.

Merging!

@yrodiere yrodiere merged commit b16f45b into quarkusio:main Oct 28, 2021
@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Oct 28, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 28, 2021
@yrodiere yrodiere linked an issue Nov 2, 2021 that may be closed by this pull request
@yrodiere yrodiere deleted the i6948-entitylistener-cdi branch May 31, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support JPA Entity Lifecycle Callbacks @Inject Injection into EntityListener not working
3 participants