I've never seen that problem before...

Cake offers the same functionality, it is well documented in every
book. Basically you crater a field called created or updated as a
datetime, default null and cake will populate it automatically.

On Jul 12, 5:02 pm, Grzegorz Pawlik <grzegorzpaw...@gmail.com> wrote:
> just switching from 1.3.0 to 1.3.2 got me into trouble, when I have
> field specified as:
>
>   `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
>
> and don't supply any value for that field in array I try to save ,
> neither a key in
> 1.3.0 it's working as desired - I get current timestamp in that field,
> but
> 1.3.2 tries looks that's it not null field, and read default value
> (CURRENT_TIMESTAMP) ant unfortunatelly polupulates this array with
> that pair of key/val:
> "createt_at"=>"CURRENT_TIMESTAMP"
> which is basically stupid for two reasons, I think:
> 1. It tries to duplicate database mechanisms which are working just
> fine (when no value - use default value, no need to to that:
> if no value, check what's default value defined in database and
> explicitly save data with that value)
> 2. It makes CURRENT_TIMESTAMP not working
>
> is there a way to turn that behavior off?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to