cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [cayenne-website] branch master updated: Updates to prefetching
Date Thu, 30 Jul 2020 07:38:30 GMT
This is an automated email from the ASF dual-hosted git repository.

aadamchik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 7fd0723  Updates to prefetching
7fd0723 is described below

commit 7fd0723c530e74a4a73434532ea47a6415265460
Author: Andrus Adamchik <andrus@objectstyle.com>
AuthorDate: Thu Jul 30 10:38:19 2020 +0300

    Updates to prefetching
---
 src/main/site/content/docs/4.2/cayenne-guide.html | 25 +++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/main/site/content/docs/4.2/cayenne-guide.html b/src/main/site/content/docs/4.2/cayenne-guide.html
index 45db2ab..28de728 100644
--- a/src/main/site/content/docs/4.2/cayenne-guide.html
+++ b/src/main/site/content/docs/4.2/cayenne-guide.html
@@ -2284,17 +2284,26 @@ ServerRuntime runtime = ServerRuntime.builder()
     </div> 
     <div class="listingblock"> 
      <div class="content"> 
-      <pre class="highlight"><code class="language-Java Java" data-lang="Java">ObjectSelect&lt;Artist&gt;
query = ObjectSelect
+      <pre class="highlight"><code class="language-Java Java" data-lang="Java">List&lt;Artist&gt;
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&lt;Artist&gt; 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> 


Mime
View raw message