Hi,

I have 3 tables: profiles, projects and profiles_projects

I have var $hasAndBelongsToMany = 'Project' on profile.php and var
$hasAndBelongsToMany = 'Profile' on my project.php file. I can
retrieve/query fine, but when saving, I get this error:

Warning: Invalid argument supplied for foreach() in
/home/httpd/vhosts/dev14.lo7.net/httpdocs/cake/cake/libs/model/model_php4.php
on line 905

and the odd thing is that is deletes on the join table instead of
inserting

5       INSERT INTO `projects` (`name`,`client`,`stage`) VALUES
('Proj','Name','2')
6       DELETE FROM `profiles_projects` WHERE project_id = '1'

When I use scaffolding, it's working ok so what I did was copy the form
that scaffolding uses and I also made sure that the
data[Profile][Profile] has the correct value. I even tried using
scaffolding's /project/create page for saving the form but I get the
same error.

Can someone pls tell me what's wrong?

Thanks


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to