[EMAIL PROTECTED] wrote:
hmm.. to be correct the exact code I'm using is :my %record = (); ..... $record{fieldX} = 'CURRENT_TIMESTAMP'; $schema->ruleset('table')->create(\%record); so : my $timestamp = 'CURRENT_TIMESTAMP'; $record{fieldX} = \$timestamp; seems to work. 10x very weird !! isn't this wrong behaviour ? |---------+----------------------------> | | Lee Standen | | | <[EMAIL PROTECTED]| | | u> | | | | | | 11/01/2006 07:44 | | | PM | | | Please respond to| | | dbix-class | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------------| | | | To: [email protected] | | cc: | | Subject: Re: [Dbix-class] unqouting ? | >--------------------------------------------------------------------------------------------------------------------| I believe that some (or more) methods don't do quoting if you use a scalar ref... Tried fieldX => \'CURRENT_TIMESTAMP' ? [EMAIL PROTECTED] wrote:hi, when I'm using $schema->ruleset('table')->create({ ..... fieldX => 'CURRENT_TIMESTAMP' ..}); The fieldX is set to "0000-00-00 00:00:00" instead of current timestamp, probably 'cause it interpreters it like string instead of value. How can I tell dbix that it should interpeter value literaly instead quoting it ? thanx
Not in the slightest How otherwise can DBIC tell whether you mean UPDATE table SET fieldX = CURRENT_TIMESTAP WHERE ....; or UPDATE table SET fieldX = "CURRENT_TIMESTAMP" WHERE ....; _______________________________________________ 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]/
