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
SQLiteConstraintException #127
Comments
Can you post your Device model and the related models? |
It seemed to be happening on all devices I tried it on -
I got so frustrated with it that I ended up removing all relations :( |
Facing the same issue with my application also. |
This still seems to be an issue. If anyone figured this out, some help would be appreciated. |
+1 I'm seeing this issue as well, exactly as reported. It seems after deleting the app from the device, the first install is fine, but subsequent installs consistently fail. This is a major bug. |
Encountering the exact same problem as @davidgoli . Have added onDelete = Column.ForeignKeyAction.CASCADE as others have suggested from google search but didn't resolve the problem. |
Encountered this problem today, if anyone still have the "issue", you just have to delete all relations before, in this case, you have to call Vehicles.deleteall(), before Devices.deleteAll(). |
I managed to solve my problem at the end. With my case it was at update that caused the exception. Adding onUpdate = CASCADE solved it. |
+1 I'm seeing this problem too. Deleting the dependent records first resolves it, adding |
Browsing through the ActiveAndroid code, it appears that the |
Just to be sure, is |
Yes, for me it worked to uninstall the app, as the tables get re-created with the ON DELETE action on the column. |
yes you do need to purge existing table (or update the table with the right
|
Just stumbled about this issue per accident. There is a bug in SQLite regarding Foreign Keys which occurs in 3.6.21 and is fixed at least since 3.8.1. This might be the cause of this bug. More details can be found here: http://bugs.python.org/issue19450 |
Anyone figured out a way around this? |
When doing
or
It works fine some of the time but then out of nowhere it throws
I have a foreign key on the table that I have tried setting
onDelete = Column.ForeignKeyAction.SET_NULL
and
onDelete = Column.ForeignKeyAction.CASCADE
and without any onDelete and the same problem arises. Any ideas?
The text was updated successfully, but these errors were encountered: