#6137: created time was reset during update
--------------------------------+-------------------------------------------
Reporter: [email protected] | Owner: mark_story
Type: Test Case | Status: closed
Priority: High | Milestone: 1.2.x.x
Component: PostgreSQL | Version: 1.2 Final
Severity: Critical | Resolution: worksforme
Keywords: | Php_version: PHP 5
Cake_version: |
--------------------------------+-------------------------------------------
Changes (by mark_story):
* status: assigned => closed
* resolution: => worksforme
Comment:
Using all your code as supplied I cannot reproduce the error. I do not
get any SQL errors, nor does {{{::character varying}} appear anywhere in
my sql statements. As for the created time being reset, when you use
{{{Model::create()}}} on an existing record you are asking the model to
reset set any non-existant fields to their defaults. Which in the case of
your created and modified fields is {{{now()}}. If this is undesired then
do not use create() and use set() instead. If you do not wish to loose
your created time on each save then remove the default value from it, or
use set() instead. If you would like to reopen with a diff against an
existing test case please do so. But as it stands I think the error is in
your use of create().
--
Ticket URL: <https://trac.cakephp.org/ticket/6137#comment:4>
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
-~----------~----~----~----~------~----~------~--~---