If you want a "permanent" solution to restricting the fields returned, define a "fields" array in your model ( i.e. when defining hasMany/belongsTo associations )
Hint: Look under Section 4 "Associations" at http://manual.cakephp.org/chapter/models In conjunction, review your "recursion" setting when using findAll() etc if you don't want to go that deep in the first place On 9/4/07, Braindead <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a model 'posts'. 'Post' has and belongs to many 'Comment'. > 'Comments' belongs to 'Author'. 'Author' comes from my model 'users'. > Everything is working fine. I can access the post, the comments and > the author information. > > The only problem I have is the fact, that every single field from the > 'users' model is accessible, including salt and hash of the login > password. I only want selected fields, like nickname and id. Is this > possible? > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
