Embedded Realm Object
Marker interface to define an embedded model.
Embedded objects have a slightly different behavior than normal objects:
They must have exactly 1 parent linking to them when the embedded object is added to the Realm. Embedded objects can be the parent of other embedded objects. The parent cannot be changed later, except by copying the object.
They cannot have fields annotated with
@PrimaryKey.When a parent object is deleted, all embedded objects are also deleted.
Extensions
Defines a backlink that represents a one-to-one inverse relationship between an EmbeddedRealmObject and a TypedRealmObject.
Returns a BacklinksDelegate that represents the inverse relationship between two an EmbeddedRealmObject and a TypedRealmObject.
Gets the parent of the embedded object, embedded objects always have an unique parent, that could be a RealmObject or another EmbeddedRealmObject.
Returns a TypedRealmObject that represents the parent that hosts the embedded object.