Thanks will try a $hasMany relationship

On 1/31/07, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> Well, change your table / field names to match the Cake conventions
> ( http://manual.cakephp.org/appendix/conventions ), build your models,
> add the associations you think you need ( http://manual.cakephp.org/
> chapter/models ), then come here with some more specific questions if
> you have problems.
>
> The associations I imagine you need are:
>
> User hasMany Order
> Order hasMany OrderLine
> OrderLine belongsTo Supply, Order
> Supplier hasMany Supply
> Supply hasMany OrderLine
>
> With something like this, you will be able to do
> $this->Order->recursive = 2;
> $order = $this->Order->read( null, $order_id );
>
> echo $order['OrderLine'][0]['Supply']['title']
>
> to print out the title of the first OrderLine's supply of the
> specified Order.
>
>
> >
>


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

Reply via email to