Re: Automatically select a subset of a model's fields

2010-05-14 Thread Michele Ferri
Thanks. Now I gotta figure out how to limit the fields stored in session by the Auth component, and I'm set. On May 12, 11:46 pm, WoJoCo j...@wojoco.com wrote: Hi, In your associations you can name the fields that Cake retrieves in the model associations - something like: var $belongsTo =

Automatically select a subset of a model's fields

2010-05-12 Thread Michele Ferri
Hi. In my web app I am bridging with PHPBB for user authentication, so my main user database table is PHPBB's user table. I created a Cake model for it. The problem is, lots of tables in my app join with the user table, which has a lot of fields related to PHPBB stuff, but I only really need the

Re: Automatically select a subset of a model's fields

2010-05-12 Thread WoJoCo
Hi, In your associations you can name the fields that Cake retrieves in the model associations - something like: var $belongsTo = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'user_id', 'fields' = array( 'User.id', 'User.email', 'etc', 'etc'), ) ); Is the basic structure that