I have 3 models on same form having relation in a tree format.
Please guide me if the following [Post data dump] will work while
using saveAll
Array
(
[Product] => Array
(
[site_admin_id] => 1
)
[ProductVariation] => Array
(
[0] => Array
(
[catalog_number] => AXYCATA 6th1
[packaging] => 2
[product_variation_package_type_id] => 3
[quantity] => 300
[site_admin_id] => 1
)
[1] => Array
(
[catalog_number] => AXYCATA 6th2
[packaging] => 4
[product_variation_package_type_id] => 3
[quantity] => 600
[site_admin_id] => 1
)
[2] => Array
(
[catalog_number] => AXYCATA 6th3
[packaging] => 6
[product_variation_package_type_id] => 3
[quantity] => 1000
[site_admin_id] => 1
)
)
[ProductVariationTranslation] => Array
(
[0] => Array
(
[title] => Prod 6 Var 1
[description] =>
[site_admin_id] => 1
[language_code] => en
)
[1] => Array
(
[title] =>
[description] => This is 2nd variation for Product
6
[site_admin_id] => 1
[language_code] => en
)
[2] => Array
(
[title] => Prod 6 Var 3
[description] => This is 3rd Variation for Product
6
[site_admin_id] => 1
[language_code] => en
)
)
)
Here
Product hasMany ProductVariation
then
ProductVariation hasMany ProductVariationTranslation
While executing the saveAll, all get saved except
ProductVariationTranslation.
It is also not getting validated during saveAll.
The other format I have tried is as below [POST data dump]:
Array
(
[Product] => Array
(
[site_admin_id] => 1
)
[ProductTranslation] => Array
(
[0] => Array
(
[title] => Product 6
[description] => This is the 6th product on Axygen
website
[site_admin_id] => 1
[language_code] => en
)
)
[ProductVariation] => Array
(
[0] => Array
(
[catalog_number] => AXYCATA 6th1
[ProductVariationTranslation] => Array
(
[0] => Array
(
[title] =>
[description] => 2 packs with 500
quantity each
[site_admin_id] => 1
[language_code] => en
)
)
[packaging] => 2
[product_variation_package_type_id] => 3
[quantity] => 300
[site_admin_id] => 1
)
[1] => Array
(
[catalog_number] => AXYCATA 6th2
[ProductVariationTranslation] => Array
(
[0] => Array
(
[title] => Prod 6th Variation 2
[description] =>
[site_admin_id] => 1
[language_code] => en
)
)
[packaging] => 4
[product_variation_package_type_id] => 3
[quantity] => 600
[site_admin_id] => 1
)
)
)
This also dose not work and behaves similar to the previous one.
Please help.
:) Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment