cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [cayenne] branch master updated: update new features guide
Date Wed, 04 Sep 2019 14:31:20 GMT
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ec1560  update new features guide
9ec1560 is described below

commit 9ec1560b0d12e58aec9fd5c98565c063968cbd14
Author: Nikita Timofeev <stariy95@gmail.com>
AuthorDate: Wed Sep 4 17:30:54 2019 +0300

    update new features guide
---
 .../docs/asciidoc/_upgrade-guide/new-features.adoc | 41 +++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/docs/asciidoc/upgrade-guide/src/docs/asciidoc/_upgrade-guide/new-features.adoc
b/docs/asciidoc/upgrade-guide/src/docs/asciidoc/_upgrade-guide/new-features.adoc
index de572fc..ae1305d 100644
--- a/docs/asciidoc/upgrade-guide/src/docs/asciidoc/_upgrade-guide/new-features.adoc
+++ b/docs/asciidoc/upgrade-guide/src/docs/asciidoc/_upgrade-guide/new-features.adoc
@@ -14,4 +14,43 @@
 == Java Version
 
 Minimum required JDK version is 1.8 or newer.
-Cayenne 4.2 is fully tested with Java 1.8 and 11.
\ No newline at end of file
+Cayenne 4.2 is fully tested with Java 1.8 and 11.
+
+== New Features
+
+=== Subqueries
+
+Expressions are now support subqueries.
+
+[source,java]
+----
+ColumnSelect<Long> subQuery = ObjectSelect
+        .columnQuery(Artist.class, Artist.ARTIST_ID_PK_PROPERTY)
+        .where(...);
+List<Artist> artists = ObjectSelect.query(Artist.class)
+        .where(Artist.ARTIST_ID_PK_PROPERTY.in(subQuery))
+        .select(context);
+----
+
+=== New Property API
+
+Property API are greatly revised.
+This API allows to use type aware expression factories aka Properties.
+These properties are normally generated as static constants in model classes, but they can
also be created manually by
+`PropertyFactory` if needed.
+
+Typical usage in select queries:
+
+[source,java]
+----
+Painting painting = //...
+Artist artist = ObjectSelect.query(Artist.class)
+        .where(Artist.PAINTING_ARRAY.contains(painting))
+        .and(Artist.DATE_OF_BIRTH.year().gt(1950))
+        .and(Artist.ARTIST_NAME.lower().like("pablo%"))
+        .selectOne(context);
+----
+
+//== Internal Changes
+//=== New select query translator
+//=== New Flush Action implementation


Mime
View raw message