delete() POD patch from Michael Hendricks (slightly reworded)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index c1fb2b0..134e841 100644 (file)
@@ -450,6 +450,14 @@ hashref of the relationship, see L<DBIx::Class::Relationship>. 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<DBIx::Class::Storage/txn_do>)
+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<DBIx::Class::ResultSet/delete>.
 
 =cut