deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1737543 - /deltaspike/site/trunk/content/documentation/data.html
Date Sat, 02 Apr 2016 22:48:20 GMT
Author: johndament
Date: Sat Apr  2 22:48:20 2016
New Revision: 1737543

URL: http://svn.apache.org/viewvc?rev=1737543&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=1737543&r1=1737542&r2=1737543&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/data.html (original)
+++ deltaspike/site/trunk/content/documentation/data.html Sat Apr  2 22:48:20 2016
@@ -1109,8 +1109,8 @@ the query:</p>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="java"><span class="predefined-type">List</span>&lt;Person&gt;
result = personRepository.findAllByAge(<span class="integer">18</span>, <span
class="integer">65</span>)
-    .sortAsc(Person_.lastName)
-    .sortDesc(Person_.age)
+    .orderAsc(Person_.lastName)
+    .orderDesc(Person_.age)
     .lockMode(LockModeType.WRITE)
     .hint(<span class="string"><span class="delimiter">&quot;</span><span
class="content">org.hibernate.timeout</span><span class="delimiter">&quot;</span></span>,
<span class="predefined-type">Integer</span>.valueOf(<span class="integer">10</span>))
     .getResultList();</code></pre>
@@ -1134,6 +1134,21 @@ supported for Hibernate, EclipseLink and
 <p>Note that the <code>QueryResult</code> return type can also be used
with method
 expressions.</p>
 </div>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+<code>QueryResult</code> is based on our internal understanding of your query
+DeltaSpike expects the alias used in your queries to refer to the entity as <code>e</code>
+You can disable this behavior by passing in false with your attribute, <code>.orderDesc("p.age",
false)</code>
+which would add descending ordering to your existing query <code>select p from Person
p</code>
+</td>
+</tr>
+</table>
+</div>
 </div>
 <div class="sect2">
 <h3 id="_pagination">Pagination</h3>



Mime
View raw message