From: Peter Rabbitson Date: Sun, 21 Dec 2008 11:24:39 +0000 (+0000) Subject: delete() POD patch from Michael Hendricks (slightly reworded) X-Git-Tag: v0.08240~211 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1d16ffdff4dbbca024dd9b62350ed4c9486091c;p=dbsrgits%2FDBIx-Class.git delete() POD patch from Michael Hendricks (slightly reworded) --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index c1fb2b0..134e841 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -450,6 +450,14 @@ hashref of the relationship, see L. Any database-level cascade or restrict will take precedence over a DBIx-Class-based cascading delete. +If you delete an object within a txn_do() (see L) +and the transaction subsequently fails, the row object will remain marked as +not being in storage. If you know for a fact that the object is still in +storage (i.e. by inspecting the cause of the transaction's failure), you can +use C<< $obj->in_storage(1) >> to restore consistency between the object and +the database. This would allow a subsequent C<< $obj->delete >> to work +as expected. + See also L. =cut