orm: set() method don't removes other connections
Hi,
I have problem with set method on relationship ManyHasMany. I have this code
if($values->salesmen) {
$this->entity->salesmen->set([$values->salesmen]);
}
$this->orm->persistAndFlush($this->entity);
version 2.2@dev
I want set only one entity and others remove but set method behaves same as method add.
Thanks for any help
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (12 by maintainers)
Fixed in master, but it pretty complex and difficult to fix in v2.2. Please, upgrade to master, today I wil also tag 3.0-beta1, so I encourage everyone to move to 3.0 😃