Permalink
Browse files

Ignore counter cache also

  • Loading branch information...
AD7six committed Jan 22, 2015
1 parent c0ee49f commit 5e89e893f24a63883a58a97f3f0b476c93fc3f94
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Model/Datasource/Session/DatabaseSession.php
@@ -118,7 +118,11 @@ public function write($id, $data) {
$record = compact('id', 'data', 'expires');
$record[$this->_model->primaryKey] = $id;
$options = array('validate' => false, 'callbacks' => false);
$options = array(
'validate' => false,
'callbacks' => false,
'counterCache' => false
);
try {
return $this->_model->save($record, $options);
} catch (PDOException $e) {

3 comments on commit 5e89e89

@djkrul

This comment has been minimized.

Show comment
Hide comment
@djkrul

djkrul May 24, 2016

@AD7six: Could you please revert this change and re-enable callbacks (or make the behavior configurable)? I use beforeSave() to add user_id to sessions stored in the database that is probably quite a common use case, so I consider this to be a regression.

djkrul replied May 24, 2016

@AD7six: Could you please revert this change and re-enable callbacks (or make the behavior configurable)? I use beforeSave() to add user_id to sessions stored in the database that is probably quite a common use case, so I consider this to be a regression.

@ADmad

This comment has been minimized.

Show comment
Hide comment
@ADmad

ADmad May 24, 2016

Member

@djkrul Don't post comments on old commits, open an issue.

Member

ADmad replied May 24, 2016

@djkrul Don't post comments on old commits, open an issue.

@djkrul

This comment has been minimized.

Show comment
Hide comment
@djkrul

djkrul May 25, 2016

You're right, sorry about that. Created issue #8885

djkrul replied May 25, 2016

You're right, sorry about that. Created issue #8885

Please sign in to comment.