hhtokpinar / sqfEntity

SqfEntity ORM for Flutter/Dart lets you build and execute SQL commands on SQLite database easily and quickly with the help of fluent methods similar to .Net Entity Framework. SqfEntity also generates add/edit forms with validations and special controls (DropDown List, DateTime pickers, Checkboxes.. etc) for your table.
379 stars 101 forks source link

save() method doesn't update records #288

Open melikbozkurt opened 1 year ago

melikbozkurt commented 1 year ago

I am using sqfentity 2.3.0+5 package for my mobile app to store local data. In the documentation it says that save() method can be used for both updating and inserting but when I insert some data with save() method I can not update it after using again save() method.

Here is the example usage of it:

await ClubData( id: data[i]['id'], isUnlocked: 0, currentLevel: 1, totalLevel: data[i]['players'].length, logoURL: data[i]['logoURL'], points: 0, name: data[i]['name']) .save();

Let's say that data[i]['players'].length is equal to 10 and I insert the data using save() method for the first time. Then data[i]['players'].length increases and I use the same method again but totalLevel doesn't update. What am I doing wrong? Can you help me?

mzilaid commented 1 year ago

Same issue