Ok... I have used your view code and it works just fine. I get the
following...

Array
(
    [Product] => Array
        (
            [name] => gloves
        )

    [Category] => Array
        (
            [Category] => Array
                (
                    [0] => 1
                )

        )

    [Color] => Array
        (
            [Color] => Array
                (
                    [0] => 1
                    [1] => 2
                )

        )

    [Size] => Array
        (
            [Size] => Array
                (
                    [0] => 1
                    [1] => 2
                )

        )

)

This saves the correct data in all the models it should. My SQL is
below...

1 INSERT INTO `products` (`name`) VALUES ('gloves')  1  10

2 SELECT LAST_INSERT_ID() AS insertID  1 1 0

3 SELECT `CategoriesProduct`.`id` FROM `categories_products` AS
`CategoriesProduct` WHERE `CategoriesProduct`.`product_id` = 5   0 0
0

4 INSERT INTO `categories_products` (`product_id`,`category_id`)
VALUES (5,1)  1  1

5 SELECT `ColorsProduct`.`id` FROM `colors_products` AS
`ColorsProduct` WHERE `ColorsProduct`.`product_id` = 5   0 0 0

6 INSERT INTO `colors_products` (`product_id`,`color_id`) VALUES
(5,1), (5,2)  2  1

7 SELECT `ProductsSize`.`id` FROM `products_sizes` AS `ProductsSize`
WHERE `ProductsSize`.`product_id` = 5   0 0 0

8 INSERT INTO `products_sizes` (`product_id`,`size_id`) VALUES (5,1),
(5,2)  2  1
--~--~---------~--~----~------------~-------~--~----~
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