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

Nullability detection method doesn't work for JPA entities with existing callback methods #74

Closed
odrotbohm opened this issue Sep 13, 2021 · 0 comments
Assignees
Labels
module: bytebuddy ByteBuddy plugin module: jpa JPA runtime integration type: bug Bug
Milestone

Comments

@odrotbohm
Copy link
Member

We cannot generate the callback method in case a method annotated with the relevant JPA callback annotations already exists, as it only supports one per class. Instead, we have to augment the existing one, if present.

@odrotbohm odrotbohm added module: jpa JPA runtime integration type: bug Bug module: bytebuddy ByteBuddy plugin labels Sep 13, 2021
@odrotbohm odrotbohm added this to the 0.6 milestone Sep 13, 2021
@odrotbohm odrotbohm self-assigned this Sep 13, 2021
odrotbohm added a commit that referenced this issue Sep 13, 2021
We now make sure that we do not generate multiple entity lifecycle callback methods in case the user code already contains one. If that's the case, we rather advice the existing method to get the null to verify the nullability on method exit, so that callbacks could still default some of the fields declared as non-nullable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: bytebuddy ByteBuddy plugin module: jpa JPA runtime integration type: bug Bug
Projects
None yet
Development

No branches or pull requests

1 participant