I am working with the following models:

Scheme
  belongsTo Organisation
  HABTM SchemeService
Organisation
  hasOne Scheme
SchemeServices
  HABTM Scheme

$this->Scheme->save($this->data) saves my Scheme and SchemeServices
(HABTM) no problem, but I then have to call an extra save for $this-
>Scheme->Organisation->save($this->data);

I switched to $this->Scheme->saveAll($this->data) which now saves and
properly associates my Scheme and Organisation data, but ignores the
SchemeService HABTM.

If my data array is correct for the save() why should it not work in
the saveAll()?

Included a dump of my data array.

$this->data

Array
(
    [Scheme] => Array
        (
            [id] => 460
            [is_active] => 1
            [status_id] => 675
            [region_id] => 67
            [nature_id] => 3
            [partner_information] => 23456
            [date_operational] => Array
                (
                    [month] =>
                    [day] =>
                    [year] =>
                )

            [date_monitoring] => Array
                (
                    [month] =>
                    [day] =>
                    [year] =>
                )

            [date_ceased] => Array
                (
                    [month] =>
                    [day] =>
                    [year] =>
                )

            [area_benefit] => 3
            [hours_referral] => 4
            [hours_office] => 5
            [profile_introduction] => 6
            [profile_footer] => 7
            [profile_extra] => 8
            [referer_information] => 9
        )

    [Organisation] => Array
        (
            [id] => 1553
            [name] => 1 Scheme 1
        )

    [Service] => Array
        (
            [Service] => Array
                (
                    [0] => 719
                    [1] => 717
                    [2] => 782
                )
        )
)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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