You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Example:
2 entities
There are two options to fetch Promotion and related Products
$em->getRepository(Promotion::class)->findOneBy(['id' => 11111]);
The problem appears when I am trying to remove concrete Product from Promotion product collection
Expected result:
UPDATE product SET promotion_id = null WHERE id = 2
But with OPTION 1 nothing happens, Doctrine remove the association only using OPTION 2, or if I remove indexBy="articleId" option
It looks like Doctrine does not track as usual collection indexed by a custom field...
I will be glad for any help
Beta Was this translation helpful? Give feedback.
All reactions