AndaluZ AndaluZ - 7 months ago 46
Objective-C Question

How to add property in RLMObject which Realm ignores?

I want to add a property of type boolean in a derived RLMObject which is only needed during runtime. So it's not part of the database table. Is there a way to mark the property as not part of the table in Realm?

The reason I need this, is because I want to save the selected state of a uitablecell during runtime. This means, I don't need an extra field in the database table.

I hope my question is clear, thank you.


I think you will want to use ignored properties of Realm:

edit: included the Swift docs link, but the question is about ObjC

Override Object.ignoredProperties() to prevent Realm from persisting model properties. Realm won’t interfere with the regular operation of these properties: they’ll be backed by ivars and you can freely override their setters and getters.