I'm using the Entity API in my module and I'm starting to feel headache with so many problems.
I need an Entity to represent a work centre of an organization, this is the simplest case possible since I only need one field, the centre’s name (and obviously on the database table I will need an ID).
Well, I already passed trough the problems described on the questions linked in the previous paragraph, but it was not enough.
I specified the
setter callback for the centre's name, I even specified the
schema field on which relies the property. I used my own setter and with the
dpm() function provided by the Devel module I discovered that the object's instance seems immutable, I tried to update the value but didn't worked, probably I could get rid of the entity class and use the metadata wrapper for updating the values, but that could have side effects.