On Dec 1, 2:32 pm, "J.B." <[EMAIL PROTECTED]> wrote:
> As I said in my first post: "just remember to name the associations
> different names "...
> I prefer this method over Rhee's suggestion with a bool for the
> default address in the database... I think it looks nicer and feel
> more OO :)

I'd describe using User belongsTo DefaultAddress as fragile.

It puts you in a position where you can have inconsistent data
(pointing at a Default address which isn't actually linked to the user
or doesn't exist), as well as confusing what belongs to what, which is
quite un-OO. If in doubt, if you create a circular reference (User
BelongsTo DefaultAddress BelongsTo User) that should trigger some
thoughts along the lines that something you are doing simply isn't
right.

IMO of course.

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