There are two different situations for your example:
- $data holds a complete record of your model data. Then you can simply access $data['Model']['dataChangeByBehaviors']:
if ($this->Model->save($data)){
$data['Model']['dataChangeByBehaviors']; //---- I want get this
}
So, here the answer is: You already have the data.
(Note: If it's a new record, $data will of course not contain the ID, which you need to get from $this->Model->id. And if you are making any changes in the beforeSave() callback, these will of course not be reflected in your $data).
- $data only contains certain fields that you update in a record. Then there is no other way to get the complete record, apart from reading it from the database - which is what you are doing already and can be simplified as suggested by Leo:
if ($this->Model->save($data)){
$last = $this->Model->read(null,$this->Model->id);
$last['Model']['dataChangeByBehaviors']; //---- I want get this
}
So here the answer is: There is no way of getting the data without a database request.