I am just trying to get some clarity on associations.  I've done a
little object orientated programming before and in cake it seems a
little different in regard to extending objects.  In my case I have a
table for people, clients and suppliers.  Obviously people contains
basic info like name, address, phone etc.  Client would contain
company name, discount rate etc. Supplier would contain other supplier
related info.  In the past I would build a model so that the 'client'
extends the 'person' class.

In cake I understand you use 'belongsTo'.  So I would setup my client
model with a belongsTo association (to person).  So when I load up the
client I can access all their 'person' (table) information as well?
The only different being rather than getting the address of a client
this way $data['client']['address'], I get it $data['person']
['address'].  Is this correct and is this the best method for
'extending' classes (using the belongsTo association).

Thanks for any advice I may have missed here.

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to