mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-825: NoEntityFoundError when using OneToOne-Relationship, when it is possible that the target is empty #1016
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Oct 3, 2010).
Jira issue originally created by user le_shatai:
When I try to access a property of the client, that the client is in a OneToOne-Relationship with and the target entity does not exists, the NoEntityFoundException is thrown, which of course is correct, as the entity indeed does not exists, but I can not make sure it exists.
So in fact I have a 1....? Relationship, where ? is 0 or 1. How is it possible to avoid that exception, an Doctrine returns an empty target object ?
It crashes when I try to access the sozialversicherungs object, which does not exists, as there is no corresponding
entry is the table.