Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in many to many insert after update sqfentity_gen to 2.2.0+7 #259

Open
master11641 opened this issue Mar 28, 2022 · 3 comments
Open

Comments

@master11641
Copy link

master11641 commented Mar 28, 2022

I use sqfentity_gen: 2.1.2+4 in my project and after update this package, model.g.dart some Errors occurred for example Undefined name 'whereString'. so for SearchCriteria after run flutter pub run build_runner build --delete-conflicting-outputs errors clear but occurred errors in run time
i have many to many relationship between two tables like tblProgram and tblpartition and define this relationship in tblpartiotion like this
SqfEntityFieldRelationship( relationType: RelationType.MANY_TO_MANY, parentTable: tblProgram, fieldName: 'partitionProgram', manyToManyTableName: 'partitionProgram', deleteRule: DeleteRule.NO_ACTION, ),

and for insert row to this table
await PartitionProgram.saveAll([ PartitionProgram(partitionTblId: part.id!, programTblId: temp!)

before with previous version sqfentity_gen: 2.1.2+4 this line has no error in run time but after update to 2.2.0+7 occurred this error
E/flutter (15125): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: DatabaseException(near ")": syntax error: , while compiling: INSERT INTO partitionProgram ( partitionTblId, programTblId) VALUES ()) sql 'INSERT INTO partitionProgram ( partitionTblId, programTblId) VALUES ()' args [2, 7]

what is my wrong ? thanks for your help

@hhtokpinar
Copy link
Owner

hhtokpinar commented Mar 28, 2022

The sample DB chinook.db model has a many-to-many related table in this package and works. Can you compare it with your model?

@hhtokpinar
Copy link
Owner

Sorry, after the last release It's possible. I'll check it out again

@hhtokpinar
Copy link
Owner

pls try again with the latest version of sqfentity_gen: 2.2.0+8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants