Ok, the answer of my question was in the question.
Prior to MySQL 5.0.2, MySQL was putting default values itself, as I've
just learned from there : 
http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html

On 23 sep, 17:13, Pixelastic <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have an issue with the Model::create method.
>
> I tried to do an update of an existing row in my DB by doing in my
> controller $this->myModel->create($this->data); and then 
> $this->myModel->save().
>
> $this->data contains the id of my entry, so it gets updated but every
> fields that were not in $this->data were reverted to null values (0,
> 0000-00-00, 0000-00-00 00:00:00 depending of the type of data).
>
> It's strange because it did not occurs on my developpement machine,
> only while in production, updating rows reverted them to nearly empty
> rows.
>
> When I do a single Model::create on dev it return me an empty array.
> When I do the same on production, it returns me an array of my table
> schema with every fields set to an empty value (0 or 0000-00-00).
>
> So it must be some kind of configuration issue, but did any of you
> have any idea what can cause this ?
> I'm on MySQL 5.0.22 on dev and 4.1.13 on production.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to