Hi.
I've been banging my head on the walls for almost a day now and still
haven't understood what am I doing wrong
I've set up a test that I think should work but it doesn't:
$fakedata = array(
'Post' => array(
'event_datetime' => "2011-06-07 23:10:00", 'description_pt' =>
'desc
pt', 'description_en' => 'desc en', 'status' => 1
),
'Attachment' => array(
array("post_id" => 500, 'dirname' => "dir", 'basename' =>
'file1.png', 'category' => 'poster', 'order' => 0),
array("post_id" => 500, 'dirname' => "dir", 'basename' =>
'file2.png', 'category' => 'poster', 'order' => 1),
array("post_id" => 500, 'dirname' => "dir", 'basename' =>
'file3.png', 'category' => 'poster', 'order' => 2),
array("post_id" => 500, 'dirname' => "dir", 'basename' =>
'file4.png', 'category' => 'poster', 'order' => 3),
array("post_id" => 500, 'dirname' => "dir", 'basename' =>
'file5.png', 'category' => 'poster', 'order' => 4),
));
shouldn't:
$this->Post->Attachment->save($fakedata);
just work?
It returns 1 but there's data being sent to the mysql database
My Post model has set up the Attachment as an hasMany relationship and
the Attachment model has a belongsto relationship to Post.
--
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