Comments (8)
in the next version (0.2.6) you can make..
from sqfentity.
thank you
When you expect the new version to be released
Sorry, but i'm Working project and string id is Very important to me.
from sqfentity.
Please update your version to 0.2.6
and you may add this property into your table model
primaryKeyType = PrimaryKeyType.text
and remove this line (if exists):
primaryKeyIsIdentity = true // (old version)
from sqfentity.
thanks for your effort
but it's not working
code:
await Users(id:'stringId',name: 'a1').save();
Error:
E/SQLiteLog( 8534): (20) statement aborts at 5: [INSERT OR REPLACE INTO users (id, userId,name,img,shortName,status,lastSeen,emails,isDeleted) VALUES (?,?,?,?,?,?,?,?,?)] datatype mismatch
from sqfentity.
I have tested this on ToDo table and it's worked.. can you send me your table model please?
final td2 = Todos2();
td2.id = "5d4c006c089eab33022cb432";
td2.title = "test";
var res = await td2.save();
print(res.toString());
// sample 2
td2.id = "5d4c006c089eab33022cb433";
td2.title = "test2";
res = await td2.save();
print(res.toString());
td2.id = "5d4c006c089eab33022cb434";
td2.title = "test3";
res = await td2.saveAs();
print(res.toString());
final tdList = await Todos2().select().toList();
for (var td in tdList) {
print(td.toMap());
}
// getbyId sample
final td3 = await Todos2().getById("5d4c006c089eab33022cb434");
print(td3.toMap());
and results:
I/flutter ( 3614): {id: 5d4c006c089eab33022cb434, title: test3, completed: false}
I/flutter ( 3614): {id: 5d4c006c089eab33022cb432, title: test, completed: false}
I/flutter ( 3614): {id: 5d4c006c089eab33022cb433, title: test2, completed: false}
I/flutter ( 3614): {id: 5d4c006c089eab33022cb434, title: test3, completed: false}
from sqfentity.
Did you edit your sqflite Library?
i think my proplem in sqflite library
from sqfentity.
Please remember that you have to re-generate model if you make changes on table or db model
from sqfentity.
@majdkz97 did you re-generate after modifying the model?
Please remember that you have to re-generate model if you make changes on table or db model
from sqfentity.
Related Issues (20)
- Apparent infinite loop with many to many relationship and preload: true
- Fail to initialize on Windows
- Create table error
- toDropDownMenu Method HOT 1
- analyzer 5.0.0 HOT 1
- save() method doesn't update records HOT 1
- SQL Query execDataTable HOT 3
- `upsertAll()` fails to save results while `upsert()` will HOT 1
- Encrypt the rows in DB while inserting
- Multiple requests of creating/updading database/table
- modfiy DB password dynamically
- Relationship Exceptions and DateTime issues
- Support Dart 3/flutter 3.10 HOT 2
- Sqfentity
- How to handle db schema changes from old version to new version.
- Auto migrations do not drop removed columns
- add column And call initializeDB
- Cannot create a column name as "json"
- Still maintained?
- Add suport for Flutter 3.22 and Dart 3.4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqfentity.