parent property

RealmObjectBase? get parent

Retrieve the parent object of this embedded object.

Implementation

RealmObjectBase? get parent {
  if (!isManaged) {
    return null;
  }

  final (parentHandle, classKey) = handle.parent;
  final (type, metadata) = realm.metadata.getByClassKey(classKey);
  return realm.createObject(type, parentHandle, metadata);
}