Hi,

I could not create an object and set the date field to \q{ NOW() }.

deflate->() should not do anything if the value is a scalar ref,
but should pass it through as-is so it gets turned into raw SQL.

Mark

--- /tmp/DateTime.pm    2006-08-04 15:50:32.000000000 -0700
+++ /usr/local/share/perl/5.8.8/DBIx/Class/InflateColumn/DateTime.pm    
2006-08-04 15:50:36.000000000 -0700
@@ -64,6 +64,7 @@
           },
           deflate => sub {
             my ($value, $obj) = @_;
+            return $value if ref $value eq 'SCALAR';  # setting \q{ NOW() } 
maybe
             $obj->_datetime_parser->$format($value);
           },
         }


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to