I am using Xcode 7.2, Swift 2.1.1. I have a Realm model object below
class B: Object { dynamic let lists = List<A>() }
But the Swift compiler gives me an error:
A property cannot be marked as dynamic because its type cannot be represented in Objective-C
I saw the Realm documentation that says:
The properties of the Realm model require the dynamic attribute var to make these properties available to the underlying database data.
There are two exceptions: List and RealmOptional properties cannot be declared dynamic, because common properties cannot be represented at run time by Objective-C, which is used to dynamically send dynamic properties and should always be declared using let
But the let declaration doesn't seem to resolve this case right now. What am I missing?
source share