We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am not sure if the problem I had was do to a misunderstanding of android's sql-lite integration or a mechanoid bug.
I had to following table definition (I have simplified in hope you can reproduce):
create table mytable ( _id integer primary key autoincrement, id integer, mystring text, unique (id) on conflict ignore );
My processes did something like:
final MyTable.Builder builder = MyTable.newBuilder() .setId(parsedVariable.id) .setMyString(parsedVariable.myString); batch.add(builder.toInsertOperationBuilder().build()); resolver.applyBatch(Contract.CONTENT_AUTHORITY, batch);
I had serval tables with this pattern and ran into first time insert errors and insert errors from conflicts.
I submitted a StackOverflow thread to try to get more information about the failing insert -> http://stackoverflow.com/questions/16705083/debugging-a-operationapplicationexception-insert-failed
I was able to fix everything by updating the schema to this
create table mytable ( _id integer primary key autoincrement, id integer, mystring text, unique (id) on conflict replace );
Using replace instead of ignore.
I thought I would share my findings and see if maybe there is a bug or something else is going on.
Thanks for this fantastic tool!
Cheers!
The text was updated successfully, but these errors were encountered:
Cheers, will look into it, I have not used ignore yet but I assume it should not throw an exception but ignore your inserts.
Sorry, something went wrong.
No branches or pull requests
I am not sure if the problem I had was do to a misunderstanding of android's sql-lite integration or a mechanoid bug.
I had to following table definition (I have simplified in hope you can reproduce):
My processes did something like:
I had serval tables with this pattern and ran into first time insert errors and insert errors from conflicts.
I submitted a StackOverflow thread to try to get more information about the failing insert -> http://stackoverflow.com/questions/16705083/debugging-a-operationapplicationexception-insert-failed
I was able to fix everything by updating the schema to this
Using replace instead of ignore.
I thought I would share my findings and see if maybe there is a bug or something else is going on.
Thanks for this fantastic tool!
Cheers!
The text was updated successfully, but these errors were encountered: