Welcome Guest, Not a member yet? Register   Sign In
Allow Entities to receive save updates
#1

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.
Reply


Messages In This Thread
Allow Entities to receive save updates - by Jan Zelenka - 05-16-2020, 03:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB