thanks worked for me!
On Aug 7, 7:53 pm, francky06l <[EMAIL PROTECTED]> wrote:
> You can define in your model model relation, the fields (using the
> "fields" key ie :
>
> class Customer extends AppModel {
>
> var $name = 'Customer';
> var $hasMany = array(
> 'Document' => array('className' => 'Document',
> 'foreignKey'
> => 'customer_id',
> 'conditions'
> => '',
> 'fields' =>
> array('id', 'customer_id', 'vehicle_id',
> 'filename', 'size', 'mime', 'doctype'),
> 'order' => '',
> 'limit' => '',
> 'offset' =>
> '',
> 'dependent'
> => '',
> 'exclusive'
> => '',
> 'finderQuery'
> => '',
>
> 'counterQuery' => ''))
>
> ....
>
> of course you can do the same (I guess) when using bindModel.
>
> Hope this helps
>
> On Aug 7, 6:31 pm, sdc53 <[EMAIL PROTECTED]> wrote:
>
> > I've seen unbindModel, but that removes the reference to the entire
> > table. I need to not automatically retrieve certain columns from
> > related tables, in this case a table that contains blobs and
> > filenames.
> > for example:
> > parent
> > id
> > name
> > company
> > etc..
> > child blobs
> > id
> > parent_id
> > filename
> > filetype
> > data
>
> > when I do a $row=$this->Parent->read(null, $id);
> > obviously I get everything. I haven't seen any examples of what the
> > first argument would do, but I think it would be a one-dimensional
> > array of fieldnames to include. does it allow you to specify something
> > like "child.id"?
> > If so, I'd prefer not to go that route as there are many tables I'm
> > retrieving data from and the schema is still changing. What I'd like
> > to do is simply specify specific columns to exclude. Is there an
> > elegant way to do this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---