fluentpdo icon indicating copy to clipboard operation
fluentpdo copied to clipboard

Cannot delete from tables with multiple primary keys

Open nfplee opened this issue 2 years ago • 1 comments

I've recently upgraded to the latest version (from version 1.x) and whenever I try to pass an array into the deleteFrom method I receive the error:

Envms\FluentPDO\Query::deleteFrom(): Argument #2 ($primaryKey) must be of type ?int, array given, called in C:\Users\lee.timmins\Projects\koclothing\vendor\flixon\flixon\src\Flixon\Data\Query.php on line 130

This worked fine previously, I wonder if the primary key type should be a union to accept an array?

nfplee avatar Feb 23 '23 13:02 nfplee

My current work around is to say delete('table')->where(['foo' => 1, 'bar' => 2]).

nfplee avatar Feb 23 '23 14:02 nfplee