Monday, 9 September 2013

Cakephp BelongsTo

Cakephp BelongsTo

If have a table with customers and one with addresses.
A Customer must have (only) one address but an address dont have to have a
customer (depending on field Type). So i am just asking how to tell cake
to get the customers address when finding a customer, but dont touch any
customer when finding an address..
if you're going to start asking for any code, please read again i am sure
its not necessary to post any code, i just need the right way to tell cake
the relationships between those tables using $belongsTo, $hasOne, and
stuff like that but i am not clear how to exactly do this.
Thanks!

No comments:

Post a Comment