DbObject: relax primary key check

This commit is contained in:
Thomas Gelf 2015-12-02 02:38:19 +01:00
parent 9413c8cdbd
commit a94f5c5969
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ abstract class DbObject
return $this;
}
if ($key === $this->getAutoincKeyName()) {
if ($key === $this->getAutoincKeyName() && $this->hasBeenLoadedFromDb()) {
throw new IE('Changing autoincremental key is not allowed');
}