DbObject: relax primary key check
This commit is contained in:
parent
9413c8cdbd
commit
a94f5c5969
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue