In my Android application I am using GreenDao as an orm.
I have two tables: A
and B
. Table B
has foreign key to table A
.
A
entities can execute getBList()
method and B
entities can execute getA()
method.
When I started to remove some A
entities with connected B
entities from database I noted strange behavior. Now some of newly created A
entities have connected B
entities, but there is no connecting in code:
A a = new A();
// setting some simple a fields, nothing with Bs
aDao.create(a);
a.getBList(); // not empty list
Does anybody know what can cause such behavior and how to fix it?
This is from the greenDao website:
Try to reset your relations when you add or remove elements.