Repository: cayenne
Updated Branches:
  refs/heads/master d549a2f15 -> 8a3b43c39


Update readme


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/8a3b43c3
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/8a3b43c3
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/8a3b43c3

Branch: refs/heads/master
Commit: 8a3b43c3973838462404383e93fa3f94aefd491d
Parents: d549a2f
Author: Nikita Timofeev <stari...@gmail.com>
Authored: Fri Feb 2 15:23:04 2018 +0300
Committer: Nikita Timofeev <stari...@gmail.com>
Committed: Fri Feb 2 15:23:04 2018 +0300

----------------------------------------------------------------------
 README.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/8a3b43c3/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3a67e53..cb7937d 100644
--- a/README.md
+++ b/README.md
@@ -94,9 +94,20 @@ context.commitChanges();
 #### Select Objects
 
 ```java
+// Single object select with order
+Artist artist = ObjectSelect.query(Artist.class)
+        .orderBy(Artist.NAME.asc())
+        .selectFirst(context);
+
+// Select with join
 List<Painting> paintings = ObjectSelect.query(Painting.class)
         .where(Painting.ARTIST.dot(Artist.DATE_OF_BIRTH).lt(LocalDate.of(1900, 
1, 1)))
         .select(context);
+
+// Select count
+long count = ObjectSelect.query(Painting)
+        .where(Painting.ESTINATED_PRICE.gt(10000))
+        .selectCount(context);
 ```
 
 Documentation

Reply via email to