-
Notifications
You must be signed in to change notification settings - Fork 170
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
Java record as Embeddable rejected with NoSuchMethodException in EclipseLink #2214
Comments
Java Record was implemented by #2163 |
@Riva-Tholoor-Philip can you check current state, please? |
Sure @lukasj |
the second part is still valid, actual error (on Derby):
|
and that one is covered by #2246, so closing this one |
The following error occurred when we tried to define an entity with an embeddable that is a Java record, which is supposed to be allowed in Jakarta Persistence 3.2:
Entity:
Embeddable/record:
It is complaining that the record needs a default constructor.
Even if I add one, which should not be necessary,
then it fails a little later on with a different error about being unable to set values on the embeddable. It seems like EclipseLink doesn't realize it needs to treat the Java record embeddable differently than a normal embeddable.
Also, if I try working around this by not using Java records, and switching to a Java class for the embeddable, it still get's an unexpected failure where it seems that EclipseLink has failed to disambiguate the embeddable attributes in the database when the entity has two attributes of the same embeddable type:
The text was updated successfully, but these errors were encountered: