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
Hello!
I'm using this function in order to replace items from an API REST:
private <T extends Rush> void saveList(List<T> models) { for (T model : models) { ((Model) model).registerWithId(); // RushCore.getInstance().registerObjectWithId(this, getId()) and getId is public String getId() { return String.valueOf(id); } } RushCore.getInstance().saveOnlyWithoutConflict(models); }
And I'm getting android.database.sqlite.SQLiteConstraintException: column rush_id is not unique (code 19) when the app is opened again.
Any ideas?
The text was updated successfully, but these errors were encountered:
Hi,
You can't override the getId function.
Once you have called "registerObjectWithId" getId on the base class will return the value you just registered.
I'd try removing the getId function from you class and just changing the register method to this
RushCore.getInstance().registerObjectWithId(this, String.valueOf(id));
Let me know if this works.
Cheers
Sorry, something went wrong.
I think it's working! Thank you!
No branches or pull requests
Hello!
I'm using this function in order to replace items from an API REST:
And I'm getting android.database.sqlite.SQLiteConstraintException: column rush_id is not unique (code 19) when the app is opened again.
Any ideas?
The text was updated successfully, but these errors were encountered: