I have 2 tables:
Table 1- create table table1(_id integer primary key, content text not null );
Table 2- create table table2(_id integer primary key, id_parent integer, content text not null , CONSTRAINT [FK_table2_id_parent] FOREIGN KEY (id_parent) REFERENCES table1 (_id) ON DELETE CASCADE );
But the DELETE CASCADE
doesn't do anything... Anyone know what I'm doing wrong?
[EDIT:
When I try to delete rows from table1 I can, but when I look for table2 the records are all there ... even those who have the id_parent that no longer exists from Table1.]
I'm using android 2.2.