Using Cake 1.2.0.5875 pre-beta, have two tables.... Islands, Services
(Concierge Services), and a join table islands_services.  Services are
presented as a list of checkboxes.  When an island is updated the post
data contains this:

Array
(
    [Island] => Array
        (

        )
    [Service] => Array
        (
               [Service] =>
                      (
                      )
        )
)

And obviously inside the arrays is the post data.   What I am finding
is that upon calling $this->Island->save($this->data), if all services
are "unchecked" (essentially "remove" all services from an island
definition) the post data now looks like this:

Array
(
    [Island] => Array
        (

        )
)

But upon calling $this->Island->save($this->data) the join table is
not updated (all related rows are not deleted).  [Service] must be
present in the post data for the Model to update the join table.  So I
have hacked it and I test to see if that array exists in the post data
and if not I add it.... which then causes the join table to be updated
correctly.  Just wondering if this is a bug... cause the alpha release
didn't work like this....

Thanks all.

Daniel


--~--~---------~--~----~------------~-------~--~----~
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