getOldPrimaryKey() public method
Returns the old primary key value(s).
This refers to the primary key value that is populated into the record after executing a find method (e.g. find(), findOne()). The value remains unchanged even if the primary key attribute is manually assigned with a different value.
public mixed getOldPrimaryKey ( $asArray = false ) | ||
---|---|---|
$asArray | boolean |
Whether to return the primary key value as an array. If |
return | mixed |
The old primary key value. An array (column name => column value) is returned if the primary key is composite or |
throws | yii\db\Exception |
if the AR model does not have a primary key |
Please login to continue.