From: Robert Buels Date: Tue, 15 Sep 2009 20:55:15 +0000 (+0000) Subject: another doc clarification regarding auto-inc columns with find_or_create() and such... X-Git-Tag: v0.08112~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=98d4e1b45228b4052deb1672b47d1df19e7def28 another doc clarification regarding auto-inc columns with find_or_create() and such functions --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 9625e8c..71fc173 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -2200,10 +2200,10 @@ If you want objects to be saved immediately, use L instead. B: Take care when using C 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. +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, even when set to C. =cut @@ -2346,10 +2346,10 @@ the find has completed and before the create has started. To avoid this problem, use find_or_create() inside a transaction. B: Take care when using C 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. +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, even when set to C. See also L and L. For information on how to declare unique constraints, see L. @@ -2413,10 +2413,10 @@ See also L and L. For information on how to declare unique constraints, see L. B: Take care when using C 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. +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, even when set to C. =cut @@ -2474,10 +2474,10 @@ For example: } B: Take care when using C 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. +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, even when set to C. See also L, L and L.