[LiveComponent] Uuid are not natively (de)hydrated
Wait4Code opened this issue · comments
I'm not sure if it is covered by the "Future H)" item of #102 issue but I've noticed that LiveComponent crash when trying to (de)hydrate Uuid.
More precisely, in LiveComponentHydrator#dehydrateObjectValue() method, line 507, (new PropertyInfoExtractor([new ReflectionExtractor()]))->getProperties($classType)
returns null which makes the foreach loop crash.
This is quite annoying when using Uuid in a DTO class that mixed entities and simple DTOs. I could use useSerializerForHydration
option on LineProp but then I would need to manage serialization in my entity which can be a burden.
I will try to get through this by creating an Hydration Extension for Uuid but I think this would be a nice addition if it could be managed by Live Component natively.
Is this UUID writable ? If not, maybe you could not make it a live prop ?