nextras / orm

Orm with clean object design, smart relationship loading and powerful collections.
https://nextras.org/orm
MIT License
310 stars 57 forks source link

Duplicate key value violates unique constraint in relationships #171

Closed hrach closed 7 years ago

hrach commented 8 years ago

https://github.com/nextras/orm/commit/f55963a49169d1ce3d59c5ce92ac8ce9566c26b0 probably breaks something and may result into duplicate key value violates unique constraint

JanTvrdik commented 8 years ago

the commit was reverted https://github.com/nextras/orm/commit/a2fd613be60928e90f42f40e16d8dc857124fcd2 but the issue requires more investigation to fully understand it

hrach commented 8 years ago

I guess you would like to fix the caching mechanism here: https://github.com/nextras/orm/blob/a2fd613be60928e90f42f40e16d8dc857124fcd2/src/Mapper/Dbal/RelationshipMapperManyHasMany.php#L93-L99, do you?

JanTvrdik commented 8 years ago

@hrach Unfortunately I don't understand that part of the code at all.