Wow, I'm really glad you found this. I read this yesterday and thought
"well, I guess I'll leave it the way it is until I see problems" Then
today I was testing my code and found major problems with saving HABTM
data. I thought it was because I was storing extra data in the join
tables but then I remembered this post. Thanks for your work, I would
have spent way to much time figuring this out (In fact I was just
about to change me code to use $this->model->query() to save the data
when I remembered this).
Thanks,
Dave
On Jan 16, 8:56 am, Nina <[EMAIL PROTECTED]> wrote:
> Hi All
>
> I found (and fixed) a bug in the model.php file, and I can't report it
> in the trac system, so I thought I'd report it here in case someone
> sees it and can fix it.
>
> The problem is in /cake/libs/model/model.php line 364 and on. In the
> code it says:
>
> if (isset($v[$n])) {
> $v = $v[$n];
> }
> $joined[$n] = $v;
>
> But it should say:
>
> if (isset($v[$n])) {
> $v = $v[$n];
> $joined[$n] = $v;
> }
>
> This error is in the save function and it causes a save to save habtm
> associated fields wrong, putting empty values into the database. I
> found the bug by comparing to the pre_beta code.
>
> Sincerely
>
> Nina Jansen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---