how to write Realm nested objects?
<p>i have this realm structure:</p>

<pre><code>class DateLog: Object {
    dynamic var date = NSDate()
    let workouts = List&lt;WorkoutLog&gt;()
    let activities = List&lt;ActivityLog&gt;()
}

class WorkoutLog: Object {
    dynamic var name = ""
    dynamic var value = 0
    dynamic var notes = ""
}

class ActivityLog: Object {
    dynamic var name = ""
    dynamic var value = 0
    dynamic var notes = ""
}
</code></pre>

<p><strong>how can i add to realm DateLog > WorkoutLog data?</strong>
(date for DateLog; name, value, notes for WorkoutLog)?</p>

<p>the workflow i'm looking for: </p>

<ol>
<li>add new record to date log (just a date)</li>
<li>add workout log record for that date (with all details)</li>
<li>add activity log record for that same date</li>
</ol>