Aha! I think I actually had it right before, but Cake appears to care about the order of the top-level array. So if it goes ('Post', 'Tag') it works but if it goes ('Tag', 'Post) it doesn't.
It would be neat if a future version of Cake could take this a step further and create associated records on the fly. So if instead of supplying an ID you supplied an array of fields (like you do for a normal save operation), it would create the relevant tag record. Right now saving with existing tags is easy, but I still need to create new ones manually. X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr86705cwa; Sat, 20 May 2006 09:59:02 -0700 (PDT) X-Google-Token: esSaVAwAAAD6v3WBKeD10FWVKfBPzicH Received: from 24.61.43.8 by i40g2000cwc.googlegroups.com with HTTP; Sat, 20 May 2006 16:59:02 +0000 (UTC) From: "Dave" <[EMAIL PROTECTED]> To: "Cake PHP" <cake-php@googlegroups.com> Subject: Re: saving hasAndBelongsToMany without form? Date: Sat, 20 May 2006 09:59:02 -0700 Message-ID: <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Aha! I think I actually had it right before, but Cake appears to care about the order of the top-level array. So if it goes ('Post', 'Tag') it works but if it goes ('Tag', 'Post) it doesn't. It would be neat if a future version of Cake could take this a step further and create associated records on the fly. So if instead of supplying an ID you supplied an array of fields (like you do for a normal save operation), it would create the relevant tag record. Right now saving with existing tags is easy, but I still need to create new ones manually. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---