Hi, I like the Entity working with Entities but would really appreciate 2 key improvements:
- Relax the Model::update return type
Currently this method return a bool. I need to override this method in such a way that it's capable of returning the updated Entity in case the save method is called with Object as a parameter. Updates in database are often accompanied by changes in calculated columns and I hope to be able to provide this in my project's base Model class by overridingĀ the update method instead of a providing a separate method.
- Auto update the Primary Key after insert
It would help a lot if the Model could by default set the Primary Key of an Entity after an insert. The model know what the primary key is and it knows the last inserted Id - why not allow it to update automatically.
Thanks for considering.