+1 for stork on completeness (listing all possibilities)

Am Freitag, 20. April 2012 12:47:25 UTC+2 schrieb Mangesh Sathe:
>
> Thanks ,  
>  
>   this worked .....
>
> On Fri, Apr 20, 2012 at 14:13, stork <lubomir.st...@gmail.com> wrote:
>
>> Always call as first
>>
>> $this->User->create(); //see the API
>>
>> and then either
>>
>> $fieldList = array(...);
>> $this->User->set($this->request->data);
>> $this->User->set('field', 'value');
>> $this->User->save(null, true, $fieldList);
>>
>> or directly
>>
>> $this->User->save($this->request->data, true, array(...));
>>
>> Which fields will be saved, it is decided by combination of two factors - 
>> which fields are present in data, and which fields are specified in 
>> whitelist array. Usage of whitelist (3rd param of Model::save()) is good 
>> habit - if form fields are generated by FormHelper and controller uses 
>> SecurityComponent, you don't have to worry about form tampering in client's 
>> browser, but it is better/safer to tell model about desired fields anyway.
>>
>>  -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> at http://groups.google.com/group/cake-php
>>
>
>
>
> -- 
> *         マンゲシュサテ*
> *     MANGESHSATHE*
>     
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to