[Bast-commits] r5269 - DBIx-Class/0.08/trunk/lib/DBIx/Class

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun Dec 21 11:24:40 GMT 2008


Author: ribasushi
Date: 2008-12-21 11:24:39 +0000 (Sun, 21 Dec 2008)
New Revision: 5269

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
Log:
delete() POD patch from Michael Hendricks (slightly reworded)

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2008-12-21 08:45:25 UTC (rev 5268)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2008-12-21 11:24:39 UTC (rev 5269)
@@ -450,6 +450,14 @@
 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




More information about the Bast-commits mailing list