Updates an existing entity in the database based on its primary key.
Updates multiple entities in a batch based on their primary keys.