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