Yes, I'm still having problems with saving data:
This is what I have so far:
WITH association on the model:
var $hasAndBelongsToMany = array(
'Tag' => array('className' => 'Tag',
'with' => 'TaggedPlace' ,
'joinTable' => 'places_tags',...
A form with fields like:
<input type="text" name="data[Tag][108][TaggedPlace][id]" value="316" /
>
<input type="text" name="data[Tag][108][TaggedPlace][place_id]"
value="8" />
<input type="text" name="data[Tag][108][TaggedPlace][tag_id]"
value="108" />
<input type="text" name="data[Tag][108][TaggedPlace][weight]"
value="0.50" />
then (not) saving with:
function beforeSave() {
if(!empty($this->data['Tag'])) { $this->TaggedPlace->save($this-
>data['Tag']); }
return(true);
}
I'm thinking there is a problem with the form fields (i'm generating
them manually now - helper will come later). Anybody have any ideas
where I'm going wrong?
Zoltan
On Oct 6, 7:45 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Oct 3, 3:00 am, macasek <[EMAIL PROTECTED]> wrote:
>
> > I actually asked this same question in another thread:
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/88a03571...
>
> > The answer is the use CakePHP1.2 using the 'with' option.
>
> Thanks, by googling I found this <http://www.cakephp.org/files/
> OCPHP.pdf>
>
> But, I still don't get it to work for adding.. I suppose, this may
> work for reading the data from table.. Still working on.. if anyone
> had done this, kindly share. TIA
>
> --
> <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com Blog:http://rajeshanbiah.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---