Hi Tarique, I have the following tables - Supply, identified by supplier ID and holds details of a supply - A user with username as the PK - A Order that contains many OrderLines - OrderLine is for a Supply and a qty
What I wasnt to do is when I read the details of an order I wish to read the associated details of the Supply (like name, etc) along with the OrderLine details which only contains the ids. Should use a $hasAndBelongsToMany for this? On 1/30/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote: > > On 1/30/07, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > > My questions are: > > - Give my order have many order lines how can do a join with my supply > > table to get the product names, I am not sure doing multiple gets of > > names from the supply controller is the right thing to do > > Please elaborate the problem - also look at cakePHP conventions to > organize your tables according to them so they are more easy to > understand for you and everyone else > > > - Since OrderLine is contained by Order, can I use the Order > > controller to save the OrderLine? > > Yes, in your order_controller $this->Order->OrderLine->save() will work fine > > Cheers > Tarique > > -- > ============================================================= > PHP for E-Biz: http://sanisoft.com > Cheesecake-Photoblog: http://cheesecake-photoblog.org > ============================================================= > > > > -- "I never look back darling, it distracts from the now", Edna Mode (The Incredibles) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
