Skip to content

Instantly share code, notes, and snippets.

@Mikulas
Created June 4, 2015 16:10
Show Gist options
  • Save Mikulas/3c9e6fbc186bcf5b4c6f to your computer and use it in GitHub Desktop.
Save Mikulas/3c9e6fbc186bcf5b4c6f to your computer and use it in GitHub Desktop.
diff --git a/app/model/BaseManager.php b/app/model/BaseManager.php
index 4fb7ef3..e49f3f7 100644
--- a/app/model/BaseManager.php
+++ b/app/model/BaseManager.php
@@ -237,9 +237,9 @@ abstract class BaseManager extends Nette\Object
$table = ($table ?: $this->tableName);
$pk = $this->getPrimaryKey($table);
$id = $entity[$pk];
- unset($entity[$pk]);
$values = $entity->getData();
+ unset($values[$pk]);
if (count($values) > 0) {
$this->db->query('
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment