 <p>The issue is with this line</p> <pre><code>dynamic var environment = RLMObject(object: PSTChannelEnv.className()) </code></pre> <p>It just needs to be </p> <pre><code>dynamic var environment: PSTChannelEnv </code></pre> <p>The reason we have objectClassName... is because you are creating an array with type objectClassName. When doing a to-one relationship, you already know the object class, so you can set the type directly.</p> <p>Here are more docs on the <a href="http://realm.io/docs/cocoa/0.90.5/#models" rel="nofollow">setting up your models in Realm</a></p> <p>We should throw an error though when you try to do something like this. Thanks for pointing that out!</p>