so found a solution. sort of. after building some forms and looking at
the output, i see the format as follows:

    [Tag] => Array
        (
            [name] => final2
            [rank] =>
        )

    [Artist] => Array
        (
            [Artist] => Array
                (
                    [0] => 1903895
                    [1] => 1903896
                )

        )

so have been trying to reconstruct the array, which works:

foreach($artist['Tag'] as $tag){
$t['Tag'] = $tag;
$t['Artist']['Artist'][0] = $artist['Artist']['id'];
//print_r($t);
//$this->Tag->saveAll($artist['Tag']);
$this->Tag->create();
//$this->Tag->save($t, false);
$this->Tag->save($t);
}


however, it is not saving the tags in the artist_tags table if the
tags already exist. ie. the validation is stopping the record from
being saved.

any ideas?
this also seems to be a very long winded way of doing things. am i
still missing something?

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to