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?
I tried thinks like 'Comment.Author.id' or 'Post.Comment.Author.id'
and several other things. Nothing worked. How to select only a few
fields?
This is an excerpt of the data I receive when I use $post-find(...).
Maybe this helps.
Array
(
[Post] => Array
(
[id] => 14
[title] => TEST title
[content] => TEST content
[status] => draft
[created] => 2007-08-24 23:03:35
[modified] => 2007-08-24 23:09:31
)
[Comment] => Array
(
[0] => Array
(
[id] => 1
[user_id] => 1
[content] => The first test
[created] => 2007-09-04 21:46:23
[modified] => 2007-09-04 21:46:23
[Author] => Array
(
[id] => 1
[nickname] => Braindead
[hash] => ***this is the hash***
[salt] => ***this is the salt***
[realname] => Markus
[description] => Test description
[created] => 2007-07-29 00:00:00
[modified] => 2007-08-18 12:15:48
)
)
)
)
Regards,
Markus
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---