I've been having the same problem, but I figured out how to solve it
in my situation.

I discovered that the model was trying to update records instead of
writing new ones.  If this is the case for you, simply add the
following code before your save:

$this->model->create();

API: http://api.cakephp.org/class_model.html#2edb2497b980ad65e76ddda6d2494d97

It tells your model to get ready to write a new record instead of
updating it.  I have no idea why it did this for me, but that fixed
it.


On Dec 26, 12:56 am, ProFire <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I have searched through the google group looking for an answer for why
> Model::Save() may fail sometimes because I'm experiencing the same
> problem.
>
> I noticed this pattern that some of them didn't do anything and the
> problem solved itself. Just all of a sudden, Model::Save() works. This
> was my case also.
>
> Well, I can save my data into the database already, so I won't ask for
> that solution.
>
> I feel that Model::Save() is a great feature for us, developers, but
> when it fails, it can be a little difficult to debug when we can't
> figure out the error.
>
> What I would like to ask is, what causes Model::Save() to fail? And if
> it does fail, how do we detect it? When it is detected, what can we do
> to solve it? Is there a way to make Model::Save() output some error
> code instead of hanging there with a null value or false value?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to