Hi All.
For the purpose of my question, I'll post a similar scenario to what I've
got (to avoid confusion):
Let's say I have the following structure:
User -> Member -> SpecialMember
A person is only a member if he/she is a User, and the person can't be a
SpecialMember unless he/she is a Member.
I have a hasOne association from User to Member, and a hasOne assocation
from Member to SpecialMember.
The problem I'm seeing is that if I do a findById() on the User model, I get
back an array similar to:
Array
(
[User]
[id] => 1
... user stuff ...
[Member]
[id] => 50
[user_id] => 1
... more member stuff ...
[Member] => Array
(
[id] => 50
[user_id] => 1
... all the same member stuff as above !?!!? ..
[SpecialMember] => Array
(
[member_id] => 50
... rest of the special member stuff ...
)
)
)
As you can see above, the Member data is replicated twice. Why is that? Are
my associations wrong?
If I do a pr( $this->User->Member->findById("1") ); it prints out the data
as it should:
Array
(
[Member] => Array
(
... member stuff ...
)
[SpecialMember] => Array
(
... special member stuff ...
)
)
I'd appreciate any ideas/suggestions/advice on the above problem. Thanks in
advance!
Regards,
Gonzalo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---