deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject deltaspike git commit: DELTASPIKE-1105 Data Module doc fixes.
Date Sat, 02 Apr 2016 22:49:02 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 304aebb95 -> 07003cc9b


DELTASPIKE-1105 Data Module doc fixes.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/07003cc9
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/07003cc9
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/07003cc9

Branch: refs/heads/master
Commit: 07003cc9be36c79d2883398971f4167d2ad43bb7
Parents: 304aebb
Author: John D. Ament <johndament@apache.org>
Authored: Sat Apr 2 18:48:54 2016 -0400
Committer: John D. Ament <johndament@apache.org>
Committed: Sat Apr 2 18:48:54 2016 -0400

----------------------------------------------------------------------
 documentation/src/main/asciidoc/data.adoc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/07003cc9/documentation/src/main/asciidoc/data.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/data.adoc b/documentation/src/main/asciidoc/data.adoc
index e716fd1..cf9ae54 100644
--- a/documentation/src/main/asciidoc/data.adoc
+++ b/documentation/src/main/asciidoc/data.adoc
@@ -645,8 +645,8 @@ the query:
 [source,java]
 -----------------------------------------------------------
 List<Person> result = personRepository.findAllByAge(18, 65)
-    .sortAsc(Person_.lastName)
-    .sortDesc(Person_.age)
+    .orderAsc(Person_.lastName)
+    .orderDesc(Person_.age)
     .lockMode(LockModeType.WRITE)
     .hint("org.hibernate.timeout", Integer.valueOf(10))
     .getResultList(); 
@@ -659,6 +659,11 @@ supported for Hibernate, EclipseLink and OpenJPA.
 Note that the `QueryResult` return type can also be used with method
 expressions.
 
+IMPORTANT: `QueryResult` is based on our internal understanding of your query
+DeltaSpike expects the alias used in your queries to refer to the entity as `e`
+You can disable this behavior by passing in false with your attribute, `.orderDesc("p.age",
false)`
+which would add descending ordering to your existing query `select p from Person p`
+
 === Pagination
 
 We introduced the `QueryResult` type in the last chapter, which can also


Mime
View raw message