I'm really not sure if I did something wrong but I couldnt get saveAll
to work on a BelongsTo model.
I have a login table with different types of users, and I have
different tables for each type of user connected with the login table.
So for example the `user` table belongs to the login table and has a
foreign key (login_id) referencing it.
I could not get a successfull saveAll to work. The validation worked
fine but after successful validation, the save failed.
I used the manual workaround by first saving the login details and
then copying the login_id to the user table, but I still think the
saveAll should be able to do this by itself. I traced the fail to a
__save function that saveAll uses. If I understood it correctly, the
save failed because the foreign key login_id was missing. Why couldn't
it figure out what the id was or does it sound like I either tried
something that's not supported, or I did something wrong?
Thanks for your time.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment