On May 23, 2:49 pm, francky06l <[EMAIL PROTECTED]> wrote:
> If the user model is in the plugin it should not a problem.. Maybe the
> problem is how you call the find and from where ?

I do the find in the UsersController::read() function.  It seems to me
that it is a problem with the association because, when I set $this-
>User->recursive = -1; I get back just the user.  But, anything else,
it tries to pull the UserProfile and screws up.

> I guess this is when you try to find user from the application and not
> the plugin ?

No, I make the call from the users_controller in the plugin.

>Maybe the problem comes from the "calling" rather than
> the callee ?

I don't see a problem with $this->User->findById(1); but, like I said,
if I set recursive to -1 I get the user I want but, not the
user_profile.  I wanted to get both.

Alternatively, I can set the UserModel and UserProfileModel both to
recursive = -1 and just live with the extra calls but, this would be a
pain if I want to find all users.

I have also tried declaring different $hasOne and $belongsTo without
the plugin name like, 'User' instead of 'users.User' but, if I do
that, it says that it cannot find the database table user_profiles for
the 'UserProfile' model.

> hth

Thank you for replying :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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