Skip to content

Merge and persist with reference #1498

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

Closed
wants to merge 2 commits into from

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Mar 11, 2023

This is an unusual use case where the association is with an entity
column instead of the identifier. It's a specific case and the current
mapping, as it is, fails using regular Hibernate ORM anyway.

I've added a test with the persist that seems to work as expected.

@DavideD
Copy link
Member Author

DavideD commented Mar 11, 2023

Replace the previous PR: #1497

@gavinking, Here's the test for ORM: DavideD/hibernate-orm@a4b4448

Test fails with error:

org.hibernate.AssertionFailure: non-transient entity has a null id: org.hibernate.orm.test.embeddable.MergeWithReferenceTest$Bar$HibernateProxy$2WSQf5sQ

Same as the Hibernate Reactive one

DavideD added 2 commits March 11, 2023 19:27
Extract copyEntity method from the existing code
This is an unusual use case where the association is with an entity
column instead of the identifier. It's a specific case and the current
mapping, as it is, fails using regular Hibernate ORM anyway.

I've added a test with the persist that seems to work as expected.
@DavideD
Copy link
Member Author

DavideD commented Mar 13, 2023

I've created an issue: #1504

@DavideD DavideD closed this Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant