Closed flashios09 closed 9 years ago
Sounds like a good idea, however I'd probably just use the withDeleted
option and add a condition to the find, so I don't think this is needed in the plugin. If you want to submit a PR with tests I'm sure that @pgbi would probably merge it.
Closing the issue as you can just do:
$table->find('all', ['withDeleted'])->where(['deleted IS NOT NULL']);
@PGBI I know how to add a condition to get the deletedOnly, i just suggested an option like we do to add the deleted.
By the way your condition doesn't work, you have just to write
->where(['deleted'])
not ->where(['deleted IS NOT NULL'])
Hi @davidyell , Thanks for this plugin :+1: , If we pass the 'withDeleted' option to the finder
$Table->find('all', ['withDeleted'])
we will have all the rows(like we disable the plugin) but what if we want only the deleted rows ! I modified your code like this:Now we can pass the option 'onlyDeleted' like we do with 'withDeleted' to the finder :)