[Jifty-commit] r2822 - in Jifty-DBI/trunk: lib/Jifty/DBI

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Feb 22 23:32:11 EST 2007


Author: jesse
Date: Thu Feb 22 23:32:11 2007
New Revision: 2822

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm

Log:
 r46167 at pinglin:  jesse | 2006-12-13 20:38:11 -0500
 * Better debugging when we fail an is_distinct check on a create. (this probably doesn't need to actually be a warning, but it's good practice to catch it BEFORE trying to do the insert)


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	Thu Feb 22 23:32:11 2007
@@ -1009,7 +1009,10 @@
         # Implement 'is distinct' checking
         if ( $column->distinct ) {
             my $ret = $self->is_distinct( $column_name, $attribs{$column_name} );
-            return ( $ret ) if not ( $ret );
+            if (not $ret ) {
+                Carp::cluck("$self failed a 'is_distinct' check for $column_name on ".$attribs{$column_name});
+            return ( $ret ) 
+            }
         }
 
         if ( $column->type =~ /^(text|longtext|clob|blob|lob|bytea)$/i ) {


More information about the Jifty-commit mailing list