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
create an entity with string $id, mapped as uuid_type
save this entity
get the entity from the database and try to save it without changes
UoW treats this entity as changed because original data contains a Uuid object (returned from UuidType::convertToPHPValue), and the actual data in the entity object contains a string
UPDATE table SET id ='2082c2e5-9eb5-43c1-809e-82265da220f0'WHERE id ='2082c2e5-9eb5-43c1-809e-82265da220f0'
Expected behavior
UuidType always returns the same type, and it isn't possible to make such a mistake. UuidType::convertToDatabaseValue should probably only accept UuidInterface as a parameter. I was thinking about implementing that, but it's a breaking change, so I am not sure about that. Perhaps the same problem occurs also with other types. I've just created this issue to open the discussion on how it could be fixed.
The text was updated successfully, but these errors were encountered:
Can you provide some code I can use to reproduce this issue? I've read the blog post and your steps here, but I want to make sure I'm able to fully reproduce the issue.
Description
I've described the problem here: https://sarvendev.com/2024/10/uuid-orm-and-strange-deadlocks/
Steps to reproduce
Expected behavior
UuidType always returns the same type, and it isn't possible to make such a mistake. UuidType::convertToDatabaseValue should probably only accept UuidInterface as a parameter. I was thinking about implementing that, but it's a breaking change, so I am not sure about that. Perhaps the same problem occurs also with other types. I've just created this issue to open the discussion on how it could be fixed.
The text was updated successfully, but these errors were encountered: