Hi,
i created a data array including 4 models: player, skillpool (hasOne),
strokepool (hasOne) and club (hasAndBelongsToMany):
Array
(
[Player] => Array
(
[name] => John
)
[SkillPool] => Array
(
[stamina] => 9.9878
)
[StrokePool] => Array
(
[stroke0_00] => 1.0626
)
[Clubs] => Array
(
[id] => 1
)
)
To save now all together i use $this->Player->saveAll($this->data);
and it works perfectly.
Now i would like to add more players at once and put everything in a
loop, so the data array looks like:
Array
(
[0] => Array
(
[Player] => Array
(
[name] => John
)
[SkillPool] => Array
(
[stamina] => 9.6516
)
[StrokePool] => Array
(
[stroke0_00] => 3.9151
)
[Clubs] => Array
(
[id] => 1
)
)
[1] => Array(
...
)
)
Problem: The only datasets which get added now are Player and Club,
SkillPool and StrokePool (both hasOne with Player) get completely
ignored.
Can somebody explain me that? For me it doesn't make sense at all.
For an explaination and of course a possible solution i would be very
thankful :)
THANKS!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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