feathers-sequelize icon indicating copy to clipboard operation
feathers-sequelize copied to clipboard

feathers-sequelize remove method rewrite breaking change when deleting multiple items without id in table

Open chrisbag opened this issue 2 years ago • 0 comments

Hey, Just experienced a breaking change when updating to latest feathers-sequelize so thought it might be helpful if ever other people encounter this bug :)

Steps to reproduce

remove service method when removing multiple entires (null parameter) fails when table has no ID following recent method rewrite Some tables such has join tables don't necessarily need an ID in the new remove method, items are fetched and then removed by ID causing the request to fail if no ids exist this is the SQL raw query : DELETE FROM "join_table" WHERE "id" IN (NULL) https://github.com/feathersjs-ecosystem/feathers-sequelize/pull/403

Expected behavior

Should be able to delete multiple items in a table without ids or at least get an error message

Actual behavior

Code runs without error message and without deleting the entries

System configuration

feathers-sequelize 6.4.0

chrisbag avatar Jan 04 '23 10:01 chrisbag