Guide to 4.2 Features

1. Java Version

Minimum required JDK version is 1.8 or newer. Cayenne 4.2 is fully tested with Java 1.8 and 11.

2. New Features

2.1. Subqueries

Expressions are now support subqueries.

ColumnSelect<Long> subQuery = ObjectSelect
        .columnQuery(Artist.class, Artist.ARTIST_ID_PK_PROPERTY)
List<Artist> artists = ObjectSelect.query(Artist.class)

2.2. 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:

Painting painting = //...
Artist artist = ObjectSelect.query(Artist.class)