PGBI/cakephp3-soft-delete

pagination can't view softDeleted item.

Opened this issue · 1 comments

Hi, I'm trying to display softDeleted item on pagination. it seems doesn't work to me.

$this->paginate = [
'contain' => ['Users', 'WeatherCategories'],
'order' => [
'Posts.created DESC'
],
'limit' => 50
];
}

$posts = $this->paginate($this->Posts->find('all',['withDeleted']))->toArray();

or

$this->paginate = [
'withDeleted',
'contain' => ['Users', 'WeatherCategories'],
'order' => [
'Posts.created DESC'
],
'limit' => 50
];
}

$posts = $this->paginate($this->Posts->find())->toArray();

is there a way just to display the softdeleted item?

Try this :

$this->paginate = [
            'finder' => [
                'all' => $customFinderOptions
            ]
        ];

But this syntax should work :

 $this->paginate($this->Posts->find('all', ['withDeleted']));