Skip to content

Commit b2747c5

Browse files
author
Vlad Balin
committed
updated docs
1 parent e36c196 commit b2747c5

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/chapters/io.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ Initialized as `null` and serialized as `record.id`. Is not recursively cloned,
294294
Changes in shared record are not detected.
295295
296296
`sourceCollection` may be:
297-
- the variable pointing to the collection;
297+
- the JS variable pointing to the collection singleton;
298298
- the function returning the collection;
299-
- the string with the dot-separated _relative object path_ to the collection. It is resolved dynamically relative to the record's `this`.
300-
- `^` symbol in path means "take the owner" (`getOwner()` call).
301-
- `~` symbol in path means "take the store" (`getStore()` call).
299+
- the string with the dot-separated _relative object path_ to the collection. It is resolved dynamically relative to the record's `this`. Following shortcuts may be used in path:
300+
- `owner.path` (or `^path`) works as `() => this.getOwner().path`.
301+
- `store.path` (or `~path`) works as `() => this.getStore().path`.
302302
303303
```javascript
304304
@define class State extends Record {

docs/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,11 +1291,13 @@ <h3 id="-attrdef-record-from-sourcecollection-"><code>attrDef</code> : Record.fr
12911291
<p>Changes in shared record are not detected.</p>
12921292
<p><code>sourceCollection</code> may be:</p>
12931293
<ul>
1294-
<li>the variable pointing to the collection;</li>
1294+
<li>the JS variable pointing to the collection singleton;</li>
12951295
<li>the function returning the collection;</li>
1296-
<li>the string with the dot-separated <em>relative object path</em> to the collection. It is resolved dynamically relative to the record&#39;s <code>this</code>.</li>
1297-
<li><code>^</code> symbol in path means &quot;take the owner&quot; (<code>getOwner()</code> call).</li>
1298-
<li><code>~</code> symbol in path means &quot;take the store&quot; (<code>getStore()</code> call).</li>
1296+
<li>the string with the dot-separated <em>relative object path</em> to the collection. It is resolved dynamically relative to the record&#39;s <code>this</code>. Following shortcuts may be used in path:<ul>
1297+
<li><code>owner.path</code> (or <code>^path</code>) works as <code>() =&gt; this.getOwner().path</code>.</li>
1298+
<li><code>store.path</code> (or <code>~path</code>) works as <code>() =&gt; this.getStore().path</code>.</li>
1299+
</ul>
1300+
</li>
12991301
</ul>
13001302
<pre><code class="highlight javascript"> @define <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">State</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Record</span> </span>{
13011303
items : Item.Collection,

0 commit comments

Comments
 (0)