The Objectbox is setup fine. It works for other entities. This is the class I want to store in the Objectbox:
class A {
String id;
List<B> fieldA;
List<B> fieldB;
}
The custom class B instances stored in fieldA and fieldB are all unique and won't be stored in the other field again.
My entity classes look like this:
@Entity
class AEntity{
@Id(assignable: true)
int dbId = 0;
String id;
final classBRelation1 = ToMany<CustomClassBEntity>();
final classBRelation2 = ToMany<CustomClassBEntity>();
}
@Entity
class BEntity {
@Id(assignable: true)
int dbId = 0;
String id;
String field;
}
I keep getting this error: "the dbIdProperty is null" I also tried making the id not assignable and not assigning the "0" but nothing worked.