guys i'm working on a android project for my DB course and i'm using realm DB but the problem is that i just found that realm has no foreign keys(realm is NOT a relational DB) so i was wondering if there is any other solution to use as a foreign key?
i was thinking about using class composition but would it work ?
Realm has the concept of "relationships" (otherwise called as "links").
To-one relationship:
To many relationship:
And for either of those relationships, there exists an inverse relationship (Realm Java 3.5.0+)
If an object is unmanaged, then
insertOrUpdate()
/copyToRealmOrUpdate()
will insert bothA
and its instanceB
into the Realm.If an object is managed, then the object you set as value must be managed as well.