Remove of joined entities not possible for custom id types #5285

Closed
opened 2026-01-22 15:03:25 +01:00 by admin · 1 comment
Owner

Originally created by @hcomnetworkers on GitHub (Oct 7, 2016).

Originally assigned to: @lcobucci on GitHub.

The delete-calls on the connection in BasicEntityPersister::deleteJoinTableRecords do not include the types for the fields:

https://github.com/doctrine/doctrine2/blob/cd11723e6310b5973f50e7d9819c58916721d290/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php#L540

A joined entity with a custom id type can therefor not be removed because the Type::convertToDatabaseValue method is never called to transform the id into its database value.

Originally created by @hcomnetworkers on GitHub (Oct 7, 2016). Originally assigned to: @lcobucci on GitHub. The delete-calls on the connection in BasicEntityPersister::deleteJoinTableRecords do not include the types for the fields: https://github.com/doctrine/doctrine2/blob/cd11723e6310b5973f50e7d9819c58916721d290/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php#L540 A joined entity with a custom id type can therefor not be removed because the Type::convertToDatabaseValue method is never called to transform the id into its database value.
admin added the BugDuplicate labels 2026-01-22 15:03:25 +01:00
admin closed this issue 2026-01-22 15:03:26 +01:00
Author
Owner

@lcobucci commented on GitHub (Sep 20, 2019):

Already reported in https://github.com/doctrine/orm/issues/5988

@lcobucci commented on GitHub (Sep 20, 2019): Already reported in https://github.com/doctrine/orm/issues/5988
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5285