Closed SimonTellier closed 1 year ago
Dont you use softdelete ? In your sql statement you did not filter anything so maybe it takes all you ever had
Hi! Yes Thanks !, that was it. Small problem when you remove the softdelete the "delete.cascade" doesn't work anymore ...
First of, you may use
await TarifsChantier().select(getIsDeleted: false).toList()).length;
so you wont get soft delete anymore.
then on you delete command when using soft delete, if you are sure you want to delete it FOREVER, you may use this :
await TarifsChantier().select().where("id=?", parameterValue: "whateverID").delete(hardDelete: true);
Hi, I try to make a query directly in the database but I get too many results compared to the normal method. I really don't understand..
query :
print((await TarifsChantier().select().toList()).length);
print((await MyDbModel().execDataTable("SELECT * FROM TarifsChantiers")).length);
result : flutter: 1862 flutter: 12549
Version : sqfentity: ^2.2.0+6 sqfentity_gen: ^2.2.0+12