-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Delete a foreign key #1246
Comments
first you need to remove A column values in all rows which have values equal to fk you want to remove. Next remove B row |
And how do I remove values from a specific column in the row? |
How do you do same things with raw SQLite? You can either remove the whole row with Anyway how would you do the same in raw SQLite? When you understand what to do with raw SQLite (e.g. with any SQLite client) you will understand what to do with |
@yotamkr is this issue actual? |
Not anymore |
Is there a way to delete a foreign key?
I have two tables, A and B. Rows in A refer to rows in B.
I would like to delete a row in B, and to reset the foreign key in A.
How do I do that?
Example:
class A:
int _id;
string name;
std:shared_ptr key;
class B:
int _id;
I tried to reset the key ptr and update the row, but reveiced "FOREIGN KEY constraint failed: constraint failed";
Also tried to do key = nullptr, but the same error.
Yotam
The text was updated successfully, but these errors were encountered: