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

Avoid returning null from EntityManager::getReference() and getPartialReference() #8920

Open
wants to merge 1 commit into
base: 3.0.x
Choose a base branch
from

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Aug 16, 2021

This bothers me for a long time, though I'm not sure the solution is viable.

Though I'd rather not assert for notNull every time I use the reference.

@simPod simPod force-pushed the reference-null branch 3 times, most recently from 92b5ac0 to a1a58fe Compare August 16, 2021 08:49
@beberlei
Copy link
Member

This is inconsistent from my POV, EntityManager::find also returns null if not found and these two methods are related.

@simPod
Copy link
Contributor Author

simPod commented Aug 18, 2021

@beberlei but this does not do any entity lookup. Currently, null is returned when there's issue with entity hierarchy when inheritance is used and that should IMO be an error.

@simPod simPod force-pushed the reference-null branch 3 times, most recently from 53434ca to a4f9c16 Compare November 20, 2021 12:20
@simPod simPod force-pushed the reference-null branch 2 times, most recently from a934970 to 05d1161 Compare December 28, 2021 13:43
@beberlei
Copy link
Member

Before more work is done here, i believe the BC break here is too big to be reasonable and i am heavily 👎 on this change

@simPod
Copy link
Contributor Author

simPod commented Dec 29, 2021

@beberlei what about adding new methods if BC break is the issue even for the major version?

@simPod simPod force-pushed the reference-null branch 2 times, most recently from 4fd4c6d to a3127c5 Compare April 30, 2022 10:21
@simPod simPod force-pushed the reference-null branch 2 times, most recently from 376fe53 to 5599b3f Compare August 1, 2023 18:49
Copy link
Contributor

github-actions bot commented Dec 2, 2024

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Dec 2, 2024
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.

4 participants