EmbeddedRealmObject
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.
Functions
Returns a BacklinksDelegate that represents the inverse relationship between two an EmbeddedRealmObject and a TypedRealmObject.
Defines a backlink that represents a one-to-one inverse relationship between an EmbeddedRealmObject and a TypedRealmObject.
Returns whether the object is frozen or not.
Returns whether or not this object is managed by Realm.
Returns true if this object is still valid to use, i.e. the Realm is open and the underlying object has not been deleted. Unmanaged objects are always valid.
Returns a TypedRealmObject that represents the parent that hosts the embedded object.
Gets the parent of the embedded object, embedded objects always have an unique parent, that could be a RealmObject or another EmbeddedRealmObject.
Returns the Realm version of this object. This version number is tied to the transaction the object was read from.