You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by bu...@apache.org on 2016/04/03 00:48:56 UTC
svn commit: r984557 - in /websites/staging/deltaspike/trunk/content: ./
documentation/data.html
Author: buildbot
Date: Sat Apr 2 22:48:55 2016
New Revision: 984557
Log:
Staging update by buildbot for deltaspike
Modified:
websites/staging/deltaspike/trunk/content/ (props changed)
websites/staging/deltaspike/trunk/content/documentation/data.html
Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Apr 2 22:48:55 2016
@@ -1 +1 @@
-1737521
+1737543
Modified: websites/staging/deltaspike/trunk/content/documentation/data.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/documentation/data.html (original)
+++ websites/staging/deltaspike/trunk/content/documentation/data.html Sat Apr 2 22:48:55 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><Person> 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">"</span><span class="content">org.hibernate.timeout</span><span class="delimiter">"</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>