i'm trying to implement the RowGateway
class to my entities, I already have a form working with the entity and I'm trying to set the hydrator to work with ClassMethods
.
I also noticed that ArraySerializable
hydrator calls the populate()
method or exchangeArray()
and this method set the appropriate primary key when editing a row, unfortunately ClassMethods
Hydrator doesn't do that.
What would be the best way to set the correct primary key value when using the Classmethod hydrator, should I set this value before binding the entity to the form? Or, should I extend the Classmethod H. to perform this task on initialize?