Hi, I have two models that have associations between them. Let call them A and B. B has a belongsTo association with A and A has a hasMany association with B. For model A I have an action called "register" and the form in it's view has fields for both models so I can use the same for to save the info for both. Someone on IRC told me that cake was able to save both models when the method $this->A->save($this->data) was called but that isn't working for me, it only saves data for model A. I tried doing it the other way, adding the register action to B controller and doing $this->B->save($this->data) there but it doesn't work either. I also tried calling the add method in B controller from A controller but it seems that cake tries to excecute "add" as an SQL string and get an SQL error instead of calling the method.
So is there a way to save both models from same controller ? Thanks, -- Juan Luis Baptiste --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
