This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 213
Unset primary key when deleting model #6162
Labels
Milestone
Comments
👍 |
Should it not rather reset all data? public function delete()
{
$intAffected = \Database::getInstance()->prepare("DELETE FROM " . static::$strTable . " WHERE " . static::$strPk . "=?")
->execute($this->{static::$strPk})
->affectedRows;
// Reset (see #6162)
$this->arrData = array();
$this->arrRelated = array();
return $intAffected;
} @contao/workgroup-core |
Not sure about that. I could still save the model again to create a new record (not sure if that makes sense though). Unfortunately we can't destroy the object... |
leofeyer
added a commit
that referenced
this issue
Sep 16, 2013
Fixed in 4903457. |
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 1, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 2, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 3, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 3, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Oct 3, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
ralfhartmann
pushed a commit
to ralfhartmann/core
that referenced
this issue
Nov 6, 2013
leofeyer
added a commit
that referenced
this issue
Oct 31, 2014
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A call to
Model::delete
should remove the primary key fromarrData
The text was updated successfully, but these errors were encountered: