You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by jo...@apache.org on 2016/10/28 01:10:11 UTC

svn commit: r1766912 - /deltaspike/site/trunk/content/documentation/data.html

Author: johndament
Date: Fri Oct 28 01:10:11 2016
New Revision: 1766912

URL: http://svn.apache.org/viewvc?rev=1766912&view=rev
Log:
Site checkin for project Apache DeltaSpike Documentation

Modified:
    deltaspike/site/trunk/content/documentation/data.html

Modified: deltaspike/site/trunk/content/documentation/data.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/data.html?rev=1766912&r1=1766911&r2=1766912&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/data.html (original)
+++ deltaspike/site/trunk/content/documentation/data.html Fri Oct 28 01:10:11 2016
@@ -1444,6 +1444,28 @@ result of the list, or else <code>empty(
 <p>Queries returning <code>Stream&lt;T&gt;</code> act as a simple wrapper for <code>query.getResultList().stream()</code> to give back the results.</p>
 </div>
 </div>
+<div class="sect2">
+<h3 id="_entity_graphs">Entity Graphs</h3>
+<div class="paragraph">
+<p>EntityGraphs are a feature added in JPA 2.1.  The Data module supports entity graphs for query operations, where the results
+will be limited based on a defined graph.  This feature is only available if you are using a JPA 2.1 implementation.</p>
+</div>
+<div class="paragraph">
+<p><code>@EntityGraph</code> can be used for either <code>fetch</code> or <code>load</code> operations, depending on the <code>EntityGraphType</code> used in the annotation.  Most queries should use the <code>FETCH</code> option.</p>
+</div>
+<div class="sect3">
+<h4 id="_named_graphs">Named Graphs</h4>
+<div class="paragraph">
+<p>Entity graphs can be selected by name.  A <code>@NamedEntityGraph</code> should be defined already within your persistence context to leverage this.  When this graph is referenced on a repository method, it will be applied to the query.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_dyanmically_built_graphs">Dyanmically built graphs</h4>
+<div class="paragraph">
+<p>If you want to dynamically build a graph, you can do that via the <code>paths</code> attribute of the annotation.  The paths specified will be added as graph nodes.  Each graph node will be used in the select.  The format is the full path to the property, based on the property names.</p>
+</div>
+</div>
+</div>
 </div>
 </div>
 <div class="sect1">
@@ -2333,6 +2355,12 @@ provider when persisting / updating the
 <li><a href="#_zero_or_one_result">Zero or One Result</a></li>
 <li><a href="#_any_result">Any Result</a></li>
 <li><a href="#_java_8_semantics">Java 8 Semantics</a></li>
+<li><a href="#_entity_graphs">Entity Graphs</a>
+<ul class="sectlevel3">
+<li><a href="#_named_graphs">Named Graphs</a></li>
+<li><a href="#_dyanmically_built_graphs">Dyanmically built graphs</a></li>
+</ul>
+</li>
 </ul>
 </li>
 <li><a href="#_transactions">Transactions</a></li>