Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagination can't view softDeleted item. #24

Open
akutaktau opened this issue Jun 6, 2017 · 1 comment
Open

pagination can't view softDeleted item. #24

akutaktau opened this issue Jun 6, 2017 · 1 comment

Comments

@akutaktau
Copy link

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?

@Petrucheqa
Copy link

Petrucheqa commented Aug 29, 2017

Try this :

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

But this syntax should work :

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants