hi john. yea it's 1.

i have got it working another way with this kind of array:
$tags = array (
    0 => array (
        'Tag' => array (
             'id' => 123458,
                        'name' => 'test_tag3',
            'link' => 'xxx',
            'source' => 'yyy',
            'rank' => 2
        ),
        'Artist' => array (
            'Artist' => array (
                0 => 7 // this being the artist_id
            )
        )
    ),
    1 => array (
        'Tag' => array (
            'id' => 123456,
            'name' => 'existing_tag',
            'link' => 'xxx',
            'source' => 'yyy',
            'rank' => 3
        ),
        'Artist' => array (
            'Artist' => array (
                0 => 7 // this being the artist_id
            )
        )
    ),
);

but now it's deleting the already saved associations.
which leads me to this habtmAdd behavior.
http://bakery.cakephp.org/articles/bparise/2007/05/09/add-delete-habtm-behavior
seems like i'm on the right track. but

$this->Artist->habtmAdd('Tag', 1, 123456); //artist_id=1, tag id =
123456

does nothing.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to