[Bast-commits] r8475 - DBIx-Class/0.08/branches/pod_fixes/lib/DBIx/Class/Manual

frew at dev.catalyst.perl.org frew at dev.catalyst.perl.org
Sat Jan 30 20:19:30 GMT 2010


Author: frew
Date: 2010-01-30 20:19:30 +0000 (Sat, 30 Jan 2010)
New Revision: 8475

Modified:
   DBIx-Class/0.08/branches/pod_fixes/lib/DBIx/Class/Manual/Intro.pod
Log:
clarify PK stuff in intro just a bit

Modified: DBIx-Class/0.08/branches/pod_fixes/lib/DBIx/Class/Manual/Intro.pod
===================================================================
--- DBIx-Class/0.08/branches/pod_fixes/lib/DBIx/Class/Manual/Intro.pod	2010-01-30 12:11:18 UTC (rev 8474)
+++ DBIx-Class/0.08/branches/pod_fixes/lib/DBIx/Class/Manual/Intro.pod	2010-01-30 20:19:30 UTC (rev 8475)
@@ -430,7 +430,19 @@
 L<update|DBIx::Class::ResultSet/update>,
 L<delete|DBIx::Class::ResultSet/delete>
 
+For example, the following would not work:
 
+ my $row = $schema->resultset('People')
+   ->search({ last_name => 'Dantes' })
+   ->first;
+ $row->update({ children => 2 }); # <-- exception thrown because $row isn't
+                                  # necessarily unique
+
+So instead the following should be done:
+
+ $schema->resultset('People')->search({ last_name => 'Dantes' })
+   ->update({ children => 2 }); # <-- update's ALL Dantes to have children of 2
+
 =head2 Problems on RHEL5/CentOS5
 
 There used to be an issue with the system perl on Red Hat Enterprise




More information about the Bast-commits mailing list