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

DB.refrence throws EntityNotFoundException instead returning null #3068

Merged
merged 1 commit into from
May 23, 2023

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented May 23, 2023

There are cases, where DB.refrence has to hit the database (e.g. on inheritance, when specified class is not a concrete class).
Here it is possible, that null will be returned.
As DB.reference is part of the NonNullApi, an EntityNotFound exception with type and ID is thrown now.

See discussion in #3060

@rbygrave rbygrave added this to the 13.18.0 milestone May 23, 2023
@rbygrave rbygrave merged commit 114a715 into ebean-orm:master May 23, 2023
@rPraml rPraml deleted the throw-exceptions branch August 10, 2023 14:36
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.

2 participants