Maybe some one know. I want to use citusdb and I try to rewrite doctrine updates. If I use standard update for entity For example
$order = $repository->find(1);
$human->setComment("test");
$entityManager->flush();
This code create query
Updates
ordersSET
comment = "test" WHERE id = 1;
For sharding in citusdb I choosed used_id field. This field exist in all tables.
I need to receive Updates
ordersSET
comment = "test" WHERE id = 1 and user_id = 5;
I tried to add
$order = $repository->find(1);
$human->setComment("test");
$human->setUserId(5);
$entityManager->flush();
But if user_id not change doctrine remove this field from sql.
I read about preUpdate, prePost events in doctrine, maybe this can help to resolve my task. But I don't know how=(