Hi

developing a very simple webmail app in cake and am having trouble
with the association between the MailMessage model and it's related
sender's Contact model.

I want to relate the MailMessage as 'belongsTo' Contact via the
MailMessage and Contacts email field - only I can't seem to work out
how to do it, as it's automagically assuming that the field on the
Contact model is Contact.id.

Can I override the primary key as follows?

MailMessage.fromAddress = Contact.emailAddress

I suspect, I've not fully understood associations and that there is a
much more striaghtforward way to do this :)

Many thanks

D


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