If your Profile Model has already been defined $recursive = 1 or
greater, then you can do in Controller:
$this->Profile->unbindModel(array('hasMany' =>array('user_image')))
before
$this->Profile->findAll()
This makes your Profile gets main_image, but no user_image. Keep in
mind the unbindMod
You can use
$this->Profile->unbindModel(array('hasOne' =>array('main_image')))
before
$this->Profile->findAll()
On 2月14日, 下午5时21分, "mallyone" <[EMAIL PROTECTED]> wrote:
> I'm trying to figure out how to return a list of users with only one
> user_image, the one with 'main'=1 in the user_image
I'm trying to figure out how to return a list of users with only one
user_image, the one with 'main'=1 in the user_images table.
I also need to be able to return user.*, and it's associated images
for another action.
How should I handle this? Should I make another model called
profile_single_im