[Bast-commits] r7664 - DBIx-Class/0.08/trunk/lib/DBIx/Class
rbuels at dev.catalyst.perl.org
rbuels at dev.catalyst.perl.org
Tue Sep 15 20:55:15 GMT 2009
Author: rbuels
Date: 2009-09-15 20:55:15 +0000 (Tue, 15 Sep 2009)
New Revision: 7664
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
another doc clarification regarding auto-inc columns with find_or_create() and such functions
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-09-15 20:45:32 UTC (rev 7663)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-09-15 20:55:15 UTC (rev 7664)
@@ -2200,10 +2200,10 @@
instead.
B<Note>: Take care when using C<find_or_new> with a table having
-columns with values that are automatically supplied by the database
-(e.g. an auto_increment primary key column). In normal usage, the
-value of such columns should NOT be specified in the call to
-C<find_or_new>.
+columns with default values that you intend to be automatically
+supplied by the database (e.g. an auto_increment primary key column).
+In normal usage, the value of such columns should NOT be included at
+all in the call to C<find_or_new>, even when set to C<undef>.
=cut
@@ -2346,10 +2346,10 @@
this problem, use find_or_create() inside a transaction.
B<Note>: Take care when using C<find_or_create> with a table having
-columns with values that are automatically supplied by the database
-(e.g. an auto_increment primary key column). In normal usage, the
-value of such columns should NOT be specified in the call to
-C<find_or_create>.
+columns with default values that you intend to be automatically
+supplied by the database (e.g. an auto_increment primary key column).
+In normal usage, the value of such columns should NOT be included at
+all in the call to C<find_or_create>, even when set to C<undef>.
See also L</find> and L</update_or_create>. For information on how to declare
unique constraints, see L<DBIx::Class::ResultSource/add_unique_constraint>.
@@ -2413,10 +2413,10 @@
unique constraints, see L<DBIx::Class::ResultSource/add_unique_constraint>.
B<Note>: Take care when using C<update_or_create> with a table having
-columns with values that are automatically supplied by the database
-(e.g. an auto_increment primary key column). In normal usage, the
-value of such columns should NOT be specified (even as undef) in the
-call to C<update_or_create>.
+columns with default values that you intend to be automatically
+supplied by the database (e.g. an auto_increment primary key column).
+In normal usage, the value of such columns should NOT be included at
+all in the call to C<update_or_create>, even when set to C<undef>.
=cut
@@ -2474,10 +2474,10 @@
}
B<Note>: Take care when using C<update_or_new> with a table having
-columns with values that are automatically supplied by the database
-(e.g. an auto_increment primary key column). In normal usage, the
-value of such columns should NOT be specified in the call to
-C<update_or_new>.
+columns with default values that you intend to be automatically
+supplied by the database (e.g. an auto_increment primary key column).
+In normal usage, the value of such columns should NOT be included at
+all in the call to C<update_or_new>, even when set to C<undef>.
See also L</find>, L</find_or_create> and L</find_or_new>.
More information about the Bast-commits
mailing list