mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1304: Native SQL with addJoinedEntityResult() on outer join causes fatal error #1636
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 (Jul 30, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jreed:
If I do a Native SQL query and use the addJoinedEntityResult() to map a LEFT JOIN entity, for those rows with no joined entity the values are all NULL. This causes a fatal error:
Fatal error: Call to a member function setValue() on a non-object in C:\xampp\htdocs\trunk\winlibrary\doctrine-orm\Doctrine\ORM\PersistentCollection.php on line 168
The offending code is:
Not sure if there is a better place to fix this, but adding a check solves the problem:
@doctrinebot commented on GitHub (Jul 31, 2011):
Comment created by @beberlei:
We use native queries ourself in the DQL Parser. That means your native query mapping has to be wrong somehow.
Without details about the SQL, Mapping and native query its hard to find the "real" issue here. The proposed solution is only a hack to get it working. Closing issue.
@doctrinebot commented on GitHub (Jul 31, 2011):
Issue was closed with resolution "Invalid"