title: How to persist a Realm List property in Swift 4?
body: <p>Using Swift 4 and Realm 3.0.1, I'd like to store a list of Realm objects in a property of a parent Realm 
  object. I ran into the following problem:</p>
  
  <p>In Swift 4, properties that should be persisted into Realm have to be <code>@objc dynamic</code>, e.g. <code>@objc dynamic var id: String = ""</code>. However, Realm's Array replacement type, <code>List</code>, can not be stored that way: <code>@objc dynamic var children: List&lt;Child&gt;? = nil</code> causes this compiler error:</p>
  
  <blockquote>
    <p>Property cannot be marked @objc because its type cannot be represented in Objective-C</p>
  </blockquote>
  
  <p>For more context, here's a full example:</p>
  
  <pre><code>final class Child: Object {
    @objc dynamic var name: String = ""
  }
  
  final class Parent: Object {
    // this fails to compile
    @objc dynamic var children1: List&lt;Child&gt;?
  
    // this compiles but the children will not be persisted
    var children2: List&lt;Child&gt;?
  }
  </code></pre>
  
  <p>So is there another way to store object lists in Realm and Swift 4?</p>