diff --git a/lib/src/realm_class.dart b/lib/src/realm_class.dart index 70c95b1f31..c3e7c0f786 100644 --- a/lib/src/realm_class.dart +++ b/lib/src/realm_class.dart @@ -279,7 +279,10 @@ class Realm implements Finalizable { return object; } - /// TODO + /// Ingest an [AsymmetricObject] to the [Realm]. + /// + /// Ingesting is a write only operation. The ingested object will be dead immediately + /// after commit, but still transferred to the backend when possible. void ingest(T object) { final metadata = _metadata.getByType(object.runtimeType); final handle = _createObject(object, metadata, false); diff --git a/lib/src/realm_object.dart b/lib/src/realm_object.dart index 453d55e595..d860f2b147 100644 --- a/lib/src/realm_object.dart +++ b/lib/src/realm_object.dart @@ -459,7 +459,15 @@ mixin RealmObject on RealmObjectBase implements RealmObjectMarker {} /// @nodoc mixin EmbeddedObject on RealmObjectBase implements EmbeddedObjectMarker {} -/// @nodoc +/// Base for any object that can be persisted in a [Realm], but cannot be retrieved, +/// hence cannot be modified. +/// +/// The benefit of using [AsymmetricObject] is that synchronization is one-way, and +/// thus performs much better. However, they cannot be queried, or retrieved +/// locally, which limits their use-cases greatly. +/// +/// Use [AsymmetricObject] when you have a write-/only use case. You use it by +/// parsing [ObjectType.asymmetricObject] to the [RealmModel] annotation. mixin AsymmetricObject on RealmObjectBase implements AsymmetricObjectMarker {} extension EmbeddedObjectExtension on EmbeddedObject {