mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-762: undefined index errors when the join-column of a relation is NULL #938
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 (Aug 21, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user arnaud-lb:
When the value of the join-column of a relation is NULL, "undefined index" errors are thrown in UnitOfWork::createEntity().
The problem is in BasicEntityPersister::_processSQLResult() ; the attached diff fixed the problem for me.
I reproduce the problem with a code like this :
This triggers an error when the value of the column b_id is NULL.
@doctrinebot commented on GitHub (Aug 29, 2010):
Comment created by @beberlei:
fixed formating
@doctrinebot commented on GitHub (Aug 29, 2010):
Comment created by @beberlei:
This should either be fixed in MASTER, or is not an issue (redefine of the same column as key and relation). This will really only be possible with the experimental DDC-117 branch that will be merged for 2.1
@doctrinebot commented on GitHub (Aug 29, 2010):
Comment created by arnaud-lb:
My example was not clear enough, the column is not a key.
@doctrinebot commented on GitHub (Sep 13, 2010):
Comment created by @beberlei:
problem is that array_key_exists is 9 times slower than isset, and this method is easily called several thousand times. We need to find another solution
@doctrinebot commented on GitHub (Sep 13, 2010):
Comment created by @beberlei:
@roman my proposed patch is this:
it sucks this applies only to this use-case however...
@doctrinebot commented on GitHub (Sep 13, 2010):
Comment created by @beberlei:
Fixed
@doctrinebot commented on GitHub (Sep 13, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Sep 14, 2010):
Comment created by arnaud-lb:
Thanks!
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/2424b7a5c6b167c2fe37