de-serialized entities have id: NULL unless setId($id) method created
epoplive opened this issue · 2 comments
epoplive commented
I'm trying to use this, but I'm finding that all of my serialized doctrine entities have an id of NULL unless I create a setId($id) method in each entity.
Toflar commented
Is this issue still relevant or has it been resolved in the meantime?
TonyBogdanov commented
It is still relevant, but the clue is it only happens if the class has a getId
method, which leads me to believe it goes into a getter / setter mode. So, for anyone experiencing this, either use both getId()
, setId()
, or neither, don't declare just one of them.