This is an automated email from the ASF dual-hosted git repository.
aadamchik pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cayenne-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 9606191 4.2 prefetching docs update
9606191 is described below
commit 9606191e78a0c694012401ec11131dbb99de057a
Author: Andrus Adamchik <[email protected]>
AuthorDate: Thu Jul 30 10:39:39 2020 +0300
4.2 prefetching docs update
---
docs/4.2/cayenne-guide/index.html | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/docs/4.2/cayenne-guide/index.html
b/docs/4.2/cayenne-guide/index.html
index 3a9847b..6850e39 100644
--- a/docs/4.2/cayenne-guide/index.html
+++ b/docs/4.2/cayenne-guide/index.html
@@ -2465,17 +2465,26 @@ ServerRuntime runtime = ServerRuntime.builder()
</div>
<div class="listingblock">
<div class="content">
- <pre class="highlight"><code class="language-Java Java"
data-lang="Java">ObjectSelect<Artist> query = ObjectSelect
+ <pre class="highlight"><code class="language-Java Java"
data-lang="Java">List<Artist> artists = ObjectSelect
.query(Artist.class)
- // Instructs Cayenne to prefetch one of Artist's relationships.
- // Equivalent to ".prefetch("paintings",
PrefetchTreeNode.DISJOINT_PREFETCH_SEMANTICS)")
- .prefetch(Artist.PAINTINGS.disjoint());
-
-// query is expecuted as usual, but the resulting Artists will have
-// their paintings "inflated"
-List<Artist> artists = query.select(context);</code></pre>
+ .prefetch(Artist.PAINTINGS.disjoint()) <i class="conum"
data-value="1"></i><b>(1)</b>
+ .select(context); <i class="conum"
data-value="2"></i><b>(2)</b></code></pre>
</div>
</div>
+ <div class="colist arabic">
+ <table>
+ <tbody>
+ <tr>
+ <td><i class="conum" data-value="1"></i><b>1</b></td>
+ <td>Instructs Cayenne to prefetch one of Artist’s relationships.</td>
+ </tr>
+ <tr>
+ <td><i class="conum" data-value="2"></i><b>2</b></td>
+ <td>Query is executed as usual, but the resulting Artists will have
their paintings "inflated"</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
<div class="paragraph">
<p>All types of relationships can be prefetched - to-one, to-many,
flattened. A prefetch can span multiple relationships:</p>
</div>