Post hasMany Comment. Comment belongsTo Post. $this->data = array( 'Post' => array( 'title' => 'mytitle', 'text' => 'mytext') 'Comment' => array( 0 => array( 'text' => 'mytext'), 1 => array( 'text' => 'mytext') ) );
I am trying to use saveAll($this->data, array('validate' => 'first')) to save a Post and a multiple Comments from the Post controller. I am trying to modify $this->data['Comment'][0]['text'] to a different value. I can set it and debug just before returning true in beforeSave and the data looks correct. I remove the debug let it save and it doesn't get set. I can change the data from the Comment model beforeSave but then the rest of $this- >data isn't available and I need the other information in order to change the value how I want it. Do I really have to modify $this->data before sending it off to be saved and not be able to use the built in callbacks? Anyone else had this problem before? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en