I've realized the Model->data that read() sets is not in the format
that save() wants it for HABTM data, so it gets messed up.

On Mar 4, 10:36 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm getting some weird behavior when a read() precedes a save(). There
> is a HABTM 'with' relationship CommunityBulletin that joins Community
> and Bulletin.
>
> When I do:
>
> $this->Bulletin->read(null, $bulletin_id);
> $this->Bulletin->id = $another_bulletin_id;
> $this->Bulletin->save(array('title'=>'something'));
>
> The Bulletin->save() call tries to make an invalid insert into the
> CommunityBulletin table when it shouldn't make an insert at all (there
> is no HABTM data here).
>
> Take the read() call out of this equation and it works as expected.
> This only happens when the read() is up there.
>
> Anyone know what is going on?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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