OK, so I was being stupid.

I had missed adding the field to the entity $_accessible array.

I have it all working, thanks.

On Wednesday, 8 October 2014 09:15:40 UTC+1, Rob Cowie wrote:
>
> That is exactly the case. The entity returned by the save function does 
> not have the changes applied in the afterSave.
>
> I'll put an example on Github to demonstrate my problem.
>
>
>
> On Tuesday, 7 October 2014 15:20:10 UTC+1, heavyKevy wrote:
>>
>> It seems to me that the entity used to save the record in the save call 
>> is updated and available in the controller after the save call is 
>> complete...
>> Are you saying that modifications in that Entity are not showing up in 
>> the controller afterwards?
>>
>> On Monday, October 6, 2014 4:34:41 PM UTC+7, Rob Cowie wrote:
>>>
>>> Hi all, back again with another question:
>>>
>>> In our old 1.3 app, I used $this->someValue = $someData; in an afterSave 
>>> function to pass values back up to a controller.
>>>
>>> I have tried to use a $entity->set('someValue', $someData); in an 
>>> afterSave in the new cake3 table model, but this entity does not appear to 
>>> be available to me back at the controller layer. 
>>>
>>> Has any one got any pointers as to the correct way to achieve this (That 
>>> is, get a value at the controller, that has been set at the table model in 
>>> afterSave)?
>>>
>>> Thanks in advance.
>>>
>>

-- 
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.

Reply via email to