Try with $_accessible = ['*' => true];
Also show a debug of the entity after calling newEntity()
On Monday, June 23, 2014 1:43:58 PM UTC+2, Archana Goyal wrote:
>
> Hi,
>
> my Resume.php is
>
> <?php
> namespace App\Model\Entity;
>
> use Cake\ORM\Entity;
>
> class Resume extends Entity {
> protected $_accessible = ['links' => true ];
> }
> ?>
>
> but its not working.
>
> On Monday, 23 June 2014 16:38:38 UTC+5:30, José Lorenzo wrote:
>>
>> In your Resume.php entity file, you probably need to add 'links' => 1 to
>> the $_accessible array
>>
>> On Monday, June 23, 2014 8:41:56 AM UTC+2, Archana Goyal wrote:
>>>
>>> Hi,
>>> I am building cakephp 3 application. I want to save associated multiple
>>> records.
>>> my $this->request->data is
>>>
>>> Array
>>> (
>>>
>>> [name] => archana
>>> [phone] => 234234
>>> [links] => Array
>>> (
>>> [0] => Array
>>> (
>>> ['link'] => www.google.com
>>> ['user_id'] => 1
>>> )
>>>
>>> )
>>>
>>> )
>>>
>>> In my associate table data saved like
>>>
>>> id | link | user_id | resume_id
>>> 1 | | | 1
>>>
>>>
>>> and I want like this
>>>
>>> id | link | user_id | resume_id
>>> 1 | www.google.com | 1 | 1
>>>
>>>
>>>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.