Skip to content

Loading…

DDC-2579: BasicEntityPersister - delete bug #3307

Closed
doctrinebot opened this Issue · 3 comments

1 participant

@doctrinebot

Jira issue originally created by user honzap:

I think, in BasicEntityPersister is bug in detecting types:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L583

The $types array is not defined inside closure function. This makes problem with deleting entity with two and more primary keys which one of them references to another entity with reference too.
My relationship (example):
User(id,name)
Person(user_id,birthdate)
Email(userid, email) but FK (and @manyToOne relation) on userid field references to Person table/entity, not User. FK in Person entity references to User of course.
Trying delete the Email entity record throws exception based a few lines later.

@doctrinebot

Comment created by @FabioBatSilva:

Fixed : 7055ccb

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by honzap:

I agree with fix. I've done the same at my local repo and it works well. Thanks for confirmation.

@doctrinebot doctrinebot added this to the 2.3.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.