Skip to content
Snippets Groups Projects
Commit 942d0903 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #10471 from owncloud/fix-db-mapper-update

according to PHPDoc this function shall return the entity
parents 4c79d349 c08a1e64
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,7 @@ abstract class Mapper {
* Updates an entry in the db from an entity
* @throws \InvalidArgumentException if entity has no id
* @param Entity $entity the entity that should be created
* @return Entity the saved entity with the set id
*/
public function update(Entity $entity){
// if entity wasn't changed it makes no sense to run a db query
......@@ -142,7 +143,7 @@ abstract class Mapper {
// get updated fields to save, fields have to be set using a setter to
// be saved
// dont update the id field
// do not update the id field
unset($properties['id']);
$columns = '';
......@@ -171,6 +172,8 @@ abstract class Mapper {
array_push($params, $id);
$this->execute($sql, $params);
return $entity;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment