How to handle null value in realm.io?
问题 from what I see if the value is nil for a property it always throws exception. sometimes i cannot simply set a '' empty string as nil, so what's the solution in realm? thanks. 回答1: Null is now fully supported. OLD answer: Supporting nil/NULL is on the roadmap. Until then there are two workarounds: Add a separate property to indicate if your property is nil. @interface IntObject : RLMObject @property NSInteger myProp; @property boolean myPropIsNil; @end Wrap your property in an object: Object