Hello everyone,

Last resort post, I am stuck. What I have done is create a "friends"
system in my app. Although it is mildly tricky because the friends are
the same thing as users, just using an alias.

My tables look like this right now (only relevant information shown):

Users:
Id


Fans_Users:
fan_id
user_id

Fans:
id
fans_info

The fan is just an alias for another user. I have the HABTM
association set up fine and dandy. But what I cannot seem to get to
work no matter what I try, is get the user infomation to be be pulled
up with that fan. For example, User 67 has two fans, users 45 and
users 46. Not when I query for User 67, his two fans are shown, users
45 and 46. BUT, I want users 45 and users 46 information to be shown
as well. I have tried all sorts of combinations of hasOne/belongsTo in
the fans table to get the fan to link to some user info. Even tried
adding a fan_id to the user table, (which is the same thing as their
id) And linking it to that. Problem is, it is matching the Fan.id to
the fan.user_id which is obviously a problem. I was thinking if I
could somehow modify the primary key it is searching for in the local
table, it could work (instead of matching the Fan.id to the User.id,
match the Fan.fan_id to the User.id)

I am really stuck here, has anyone attempting anything similar?

Thanks.

Jim


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