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 :)

On Dec 1, 1:37 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Dec 1, 7:53 am, FrenchEscapes <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well that kind of worked!
>
> > I have put:
>
> >         var $hasMany = array(
> >                         'Address' => array('className' => 'Address',
> >                                                    'foreignKey' => 
> > 'customer_id'
> >                                                                 ),
> >         );
>
> >         var $belongsTo = array(
> >                         'Address' => array('className' => 'Address',
> >                                                    'foreignKey' =>
> > 'default_address_id',
> >                                              ),
> >                         );
>
> It's doing it because with the same name the multi dimensional array
> of hasMany Addresses is being added to/merged with the result of your
> belongsTo Address.
>
> Change the name of one of those aliases (e.g. 'Address' change to
> 'DefaultAddress').
>
> hth,
>
> AD

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