A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mongodb.com/docs/realm-sdks/objc/latest/Classes/RLMObject.html below:

RLMObject Class Reference

RLMObject

RLMObject is a base class for model objects representing data stored in Realms.

Define your model classes by subclassing RLMObject and adding properties to be managed. Then instantiate and use your custom subclasses instead of using the RLMObject class directly.

// Dog.h
@interface Dog : RLMObject
@property NSString *name;
@property BOOL      adopted;
@end

// Dog.m
@implementation Dog
@end //none needed
Supported property types Querying

You can initiate queries directly via the class methods: allObjects, objectsWhere:, and objectsWithPredicate:. These methods allow you to easily query a custom subclass for instances of that class in the default Realm.

To search in a Realm other than the default Realm, use the allObjectsInRealm:, objectsInRealm:where:, and objectsInRealm:withPredicate: class methods.

Relationships

See our Realm Swift Documentation for more details.

Key-Value Observing

All RLMObject properties (including properties you create in subclasses) are Key-Value Observing compliant, except for realm and objectSchema.

Keep the following tips in mind when observing Realm objects:

  1. Unlike NSMutableArray properties, RLMArray properties do not require using the proxy object returned from -mutableArrayValueForKey:, or defining KVC mutation methods on the containing class. You can simply call methods on the RLMArray directly; any changes will be automatically observed by the containing object.
  2. Unmanaged RLMObject instances cannot be added to a Realm while they have any observed properties.
  3. Modifying managed RLMObjects within -observeValueForKeyPath:ofObject:change:context: is not recommended. Properties may change even when the Realm is not in a write transaction (for example, when -[RLMRealm refresh] is called after changes are made on a different thread), and notifications sent prior to the change being applied (when NSKeyValueObservingOptionPrior is used) may be sent at times when you cannot begin a write transaction.
Creating & Initializing Objects Getting & Querying Objects from the Default Realm

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4