#6021: Wrong timestamp saving for automatic fields "created" and "modified"
-----------------------------------------+----------------------------------
    Reporter:  bugmenot                  |          Type:  Bug    
      Status:  new                       |      Priority:  Medium 
   Milestone:  1.2.x.x                   |     Component:  General
     Version:  1.2 Final                 |      Severity:  Normal 
    Keywords:  mysql, CURRENT_TIMESTAMP  |   Php_version:  PHP 5  
Cake_version:  1.2.1.8004                |  
-----------------------------------------+----------------------------------
 I'm having some troubles with a "created" and "modified" fields that I
 expect CakePHP to fill automatically.

 Using "var $scaffold;" in my controller, everything works as expected,
 this query is executed:

 {{{
 INSERT INTO `categories` (`name`, `modified`, `created`) VALUES ('Lola',
 '2009-01-16 18:17:06', '2009-01-16 18:17:06')
 }}}

 But then, I baked a controller and view using `cake bake` script and now,
 when adding a new object, I get this query:

 {{{
 INSERT INTO `categories` (`created`, `modified`, `name`) VALUES
 ('CURRENT_TIMESTAMP', '0000-00-00 00:00:00', 'Test')
 }}}

 And, of course, both timestamps get set to '0000-00-00 00:00:00'.

 Tested in both 1.2.0.7962 and 1.2.1.8004.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6021>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to