http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2015/03/cayenne-40m2-released.md ---------------------------------------------------------------------- diff --git a/_posts/2015/03/cayenne-40m2-released.md b/_posts/2015/03/cayenne-40m2-released.md deleted file mode 100644 index acff648..0000000 --- a/_posts/2015/03/cayenne-40m2-released.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -layout: post -title: Cayenne 4.0 Milestone 2 Released -date: 2015-3-18 ---- - -This is a big and important new milestone release of the development branch of Apache Cayenne. Existing users may have noticed that we renamed version 3.2 to 4.0 as the scope had been vastly expanded. So 4.0.M2 is a direct successor of 3.2M1. There are tons of new features and bug fixes included. Below are just the main highlights. For more details read upgrade-guide.pdf and check out the full release notes further down. - -Cayenne can be downloaded from [here](/download.html). - -### Fluent Type-Safe Query API - -Cayenne now provides a set of new fluent query classes: ObjectSelect, SQLSelect, SelectById. More will be coming in the future releases. Here is a simple example of a query selecting a single object by a given criteria: - - Artist a = ObjectSelect - .query(Artist.class) - .where(Artist.NAME.eq("Picasso")) - .selectOne(context); - - A related addition is positional bindings in Expression, SQLTemplate and the new query classes. Using the new API you'll avoid boilerplate in the most-commonly written Cayenne code, all this with full support for generics and type safety. The "old" style of bean-like queries (SelectQuery) is still supported. - -### Powerful Automated Workflow with 'cdbimport' - -'cdbimport' (a Maven/Ant task that generates DataMap from DB) was always there in Cayenne, just not very usable. In this release it was reworked to become a cornerstone of an automated workflow that allows you to keep mapping and Java classes always in sync with the underlying DB, and yet provide arbitrary customizations to the object layer. - -### OSGI Support - -All Cayenne runtime jars have proper OSGi manifests and can be used as OSGi bundles. Here is a [demo](https://github.com/andrus/cayenne-osgi-example) showing how to write an OSGi Cayenne app. The main trick is to add an OSGi module to Cayenne runtime that will take care of classloading, etc.: - - Module osgiModule = - OsgiModuleBuilder.forProject(Activator.class).withDriver(Driver.class).module(); - -### ServerRuntimeBuilder and Mapping-Free Runtime - -We found that customizing ServerRuntime is a frequent task in most applications. Things like setting a proper DataSource, loading multiple projects into a single runtime, overriding a service here and there are all very common customizations. While all of those can be done via ServerRuntime constructor and custom DI modules, we decided to add some syntactic sugar to streamline configuration. Enter ServerRuntimeBuilder: - - ServerRuntime runtime = new ServerRuntimeBuilder("myproject") - .addConfigs("cayenne-project1.xml", "cayenne-project2.xml") - .addModule(binder -> binder.bind(JdbcEventLogger.class).toInstance(myLogger)) - .dataSource(myDataSource) - .build(); - - While we are on the topic of ServerRuntime, we now also have an ability to start a mapping-free runtime, which turns Cayenne into a powerful SQL execution stack without the ORM part (e.g. useful for unit tests). - -### Transparent Database Cryptography with 'cayenne-crypto' - -Cayenne now includes [cayenne-crypto.jar](http://search.maven.org/#artifactdetails|org.apache.cayenne|cayenne-crypto|4.0.M2|jar), that allows you to implement seamless data encryption. With a bit of extra configuration (as you may have guessed - another DI module) you get automatic encryption/decryption of data in certain columns: - - Module cryptoModule = new CryptoModuleBuilder() - .keyStore("file:///mykeystore", "changeit".toCharArray(), "keyalias") - .compress() - .build(); - - By default columns that start with 'CRYPTO_' are designated as encrypted, but this is [fully customizable](https://github.com/apache/cayenne/blob/master/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/map/ColumnMapper.java). The rest of your application code doesn't need to worry about cryptography, and would look like a regular Cayenne application. - - -### DI Container Decorators - -In addition to overriding services in DI container, now Cayenne would allow to supply decorators. True to the "smallest-footprint" DI philosophy, decorator approach is very simple and does not rely on proxies or class enhancement. Just implement the decorated interface and provide a constructor that takes a delegate instance being decorated: - - public class MyInterfaceDecorator implements MyInterface { - - private MyInterface delegate; - - public MyInterfaceDecorator(@Inject MyInterface delegate) { - this.delegate = delegate; - } - - @Override - public String getName() { - return "<" + delegate.getName() + ">"; - } - } - - Module module = new Module() { - - @Override - public void configure(Binder binder) { - binder.decorate(MyInterface.class).before(MyInterfaceDecorator.class); - } - }; - -### Stability Improvements - -We got rid of the hated "runtime" ObjRelationships that caused random issues, and fixed more than 30 other bugs. - - -### A full list of changes in this release: - -* CAY-1267 Some changes to LogDialog -* CAY-1826 Merge Entity Attributes and Relationships tabs together with one toolbar. -* CAY-1839 Allow to link DataMaps to DataNodes from DataNode editor. -* CAY-1841 Filters for Left-hand project navigator -* CAY-1842 Remove Listeners support from the Modeler -* CAY-1843 DataMap v7: Stop saving listeners in DataMap, add upgrade handler -* CAY-1845 Upgrade javadoc plugin to 2.9.1 -* CAY-1846 Reworking of callback mapping -* CAY-1847 Make ConverterFactory extensible -* CAY-1848 New method: ObjectContext.selectOne(Select query) -* CAY-1851 Generate default serialVersionUID for generated java classes to avoid eclipse warnings -* CAY-1852 Straighten thread model and synchronization in the Modeler -* CAY-1855 Iterated and paginated queries must print result counts -* CAY-1856 Expression.expWithParameters does not work when parameters are placed in the inline collection -* CAY-1860 In-memory matching of DataObjects against ObjectId or int -* CAY-1861 Remove runtime relationships -* CAY-1870 cgen - smarter default for 'superPkg' and 'destDir' -* CAY-1882 Porting to OSGi environment -* CAY-1883 Clean up Cayenne maven structure -* CAY-1886 cayenne-di module reorg, new exceptions -* CAY-1890 Remove Cayenne-level buffering when retrieving LOBs -* CAY-1894 Support native PK generation using sequences for H2 databases -* CAY-1899 ServerRuntimeBuilder -* CAY-1900 Allow DataNode name to be used as a root of SQLTemplate -* CAY-1901 Config-free ServerRuntime -* CAY-1904 Simple injection-friendly constructor for AuditableFilter -* CAY-1907 RowReaderFactory -* CAY-1908 Refactor all SQLActions to work with DataNode -* CAY-1911 BatchQuery refactoring - make Iterable -* CAY-1912 BatchQueryBuilder refactoring -* CAY-1913 Refactor org.apache.cayenne.access.trans into query-specific packages -* CAY-1914 Refactor EJBQL-related translators to a standalone 'org.apache.cayenne.access.translator.ejbql' package -* CAY-1915 BatchTranslator instead of performing bindings should return binding object whose values can be altered -* CAY-1916 cayenne-crypto module that enables data encryption for certain model attributes -* CAY-1918 Replace Oracle LOB hacks with JDBC 4.0 API -* CAY-1919 Split DataNode creation into a separate DataNodeFactory -* CAY-1920 DI: add support for decorators -* CAY-1921 Support for schema selection in 'Migrate Database Schema' -* CAY-1923 Optimize BatchTranslator - use fixed size array of BatchParameterBinding -* CAY-1925 cayenne-crypto: add optional compression to the encryption pipeline -* CAY-1928 Second INNER join generated for OUTER flattended relationships in disjoint prefetches -* CAY-1929 Property.outer method to build OUTER join properties -* CAY-1932 Improved Handling for Scalar Parameters Converting Expressions to EJBQL -* CAY-1933 Problems in Evaluating EJBQL Statements with Integral Literals > Integer.MAX_VALUE -* CAY-1934 A problem exists where the escape character is not conveyed in the EJBQL when toEJBQL() is invoked on the expression. -* CAY-1936 ServerRuntime.getDataSource() returning DataSource of a default DataNode -* CAY-1937 Make Transaction an interface -* CAY-1938 Create a DI factory for transactions, get rid of TransactionDelegate and modeler config for tx policies -* CAY-1939 DataDomain must use injectable TransactionManager -* CAY-1946 CDbimport improvements -* CAY-1949 Search in configuration fields (Catalog, Schema) in DbEntity -* CAY-1952 Undeprecate (actually restore) ObjectContext.deleteObject(..) -* CAY-1953 Redo ResultIteratorCallback to handle single row callback instead of iterator -* CAY-1954 Make Cayenne class constructor protected -* CAY-1958 SelectById - a new full-featured select query to get objects by id -* CAY-1959 ObjectSelect query - a fluent API alternative to SelectQuery -* CAY-1960 ExpressionFactory.exp(..) , and(..), or(..) -* CAY-1962 Implement CayenneTable column resize on double-click on the header separator -* CAY-1965 Change version from 3.2 to 4.0 -* CAY-1966 SQLTemplate/SQLSelect positional parameter binding -* CAY-1967 Deprecate SQLTemplate parameter batches -* CAY-1968 SQLSelect cleanup and omissions -* CAY-1971 Variants of Property.like(..) : contains(..), startsWith(..), endsWith(..) -* CAY-1972 A property to override DataSources of multi-module projects -* CAY-1981 Add support of JDBC 4.0 N-types (nchar, nvarchar, longnvarchar, nclob) -* CAY-1984 cdbimport doesn't flatten many to many relationships - -### Bug Fixes: - -* CAY-1480 Implement cross-db functional expressions -* CAY-1695 Unexpected null value in bidirectional one-to-one prefetch -* CAY-1736 IllegalArgumentException when synchronizing entities in the Modeler -* CAY-1795 "Invisible" ObjAttribute in subclass -* CAY-1796 ROP: All entity's to-many relationships getting faulted from database when using it as a parameter in qualifier expression -* CAY-1797 NPE importing DataMap -* CAY-1798 ROP: Reverse relationships of prefetched entity objects are not filled during server to client objects conversion -* CAY-1799 ROP: Server can't deserialize LIKE expression with pattern already compiled -* CAY-1818 Fix copyright year in the Modeler "about" panel -* CAY-1834 Exception: ToManyList cannot be cast to DataObject -* CAY-1857 Problem with hotkeys -* CAY-1859 NullPointerException when importing EOModel -* CAY-1863 Make determining whether a particular database type supports length adapter-specific not universal -* CAY-1866 Change in General Modeler Preferences reverts old settings to default value -* CAY-1868 Select contention with multiple contexts -* CAY-1869 ResultIterator from cayenne-client dependency is subclassed from org.apache.cayenne.access.ResultIterator which is present only in cayenne-server dependency -* CAY-1874 DB2 Procedure action ignores the first result set -* CAY-1877 In-memory evaluation of expression may fail with UnsupportedOpeartionException depending on order of nodes -* CAY-1880 objectStore snapshots never cleared from RefreshQuery when "use shared cache" unchecked -* CAY-1881 CayenneModeler (Mac version) doesn't work with Java 7 -* CAY-1885 Null value in subclass's field. -* CAY-1905 Multi-step prefetching NPE : 1..N..1 with absent N and root with no qualifier -* CAY-1943 XML file not deleted when a DataMap is deleted from the project -* CAY-1961 Fix RemoveAction for DataMaps in ProjectTree -* CAY-1964 Fix convertAdditionalDataMaps() in CayenneGeneratorMojo.java -* CAY-1973 error while generating classes -* CAY-1974 Copy/Paste DbEntiry throws exception -* CAY-1978 ESCAPE clause should be included in LIKE parenthesis -* CAY-1979 Prefetches on Many-to-Many Relationships with Longvarchar -* CAY-1980 'mvn cayenne-modeler:run' seems to be broken in 4.0 -* CAY-1988 ServerRuntimeBuilder: synthetic DataNode does not have domain's DataMaps linked
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016-02-12-cayenne-40m3-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016-02-12-cayenne-40m3-released.md b/_posts/2016-02-12-cayenne-40m3-released.md new file mode 100644 index 0000000..9664df2 --- /dev/null +++ b/_posts/2016-02-12-cayenne-40m3-released.md @@ -0,0 +1,93 @@ +--- +layout: post +title: Cayenne 4.0 Milestone 3 Released +date: 2016-2-12 +--- + +This new milestone release has plenty of new features, bug fixes and other improvements. Below are just the main highlights. For more details check out the full release notes further down, as well as [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M3/docs/doc/src/main/resources/UPGRADE.txt). + +Cayenne can be downloaded from [here](/download.html). + +### Java 7 + +Since this milestone minimal Java version is 1.7. If you still need Java 1.6, you can use Cayenne 3.1 or 4.0.M2 until your application is able to upgrade. + +### Java 8 Date/Time and Joda-Time Support + +Cayenne now has two additional modules that contain ExtendedTypes for Java 8 Date/Time and Joda-Time support. You will need to add appropriate dependency and then create a coresponding module and add it to the ServerRuntime. For example: + + Module java8Module = new CayenneJava8Module(); + this.runtime = new ServerRuntime("cayenne-project.xml", java8Module); + +### Improvements in Query API + +All new fluent query classes (ObjectSelect, SQLSelect, SelectById) have the following new methods: + +* `List<T> select(ObjectContext context);` +* `T selectOne(ObjectContext context);` +* `T selectFirst(ObjectContext context);` +* `void iterate(ObjectContext context, ResultIteratorCallback<T> callback);` +* `ResultIterator<T> iterator(ObjectContext context);` +* `ResultBatchIterator<T> batchIterator(ObjectContext context, int size);` + +The "old" style SelectQuery is still supported and also includes these methods. + +Also ResultIterator and ResultBatchIterator are both AutoCloseable now. So you will be able to use try-with-resources with them. + +### Non-blocking DataSource + +Default Cayenne DataSource provider is switched to a non-blocking implementation that has a much better concurrency compared to the old version. + +### DBCP2 + +DBCPDataSourceFactory is now based on DBCP2 (which is required under Java 1.7 and newer). If you are using it, you will need to take a few steps to upgrade. For more details see [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M3/docs/doc/src/main/resources/UPGRADE.txt). + +### Capturing a stream of commit changes + +Sometimes it is very useful to capture all or parts of "commit log" for commits made through Cayenne (for audit purposes, etc). It has always been a challenge to do it in a consistent and convenient manner. We've made a few attempts to solve this before. M3 features new and the most comprehensive solution. There is a [PostCommitBuilder](https://github.com/apache/cayenne/blob/4.0.M3/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java) class that helps to create a special DI module with all required extensions for this to work. It allows to register [PostCommitListeners](https://github.com/apache/cayenne/blob/4.0.M3/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java) that will receive an event on every commit, containing a full commit log object. + +### A full list of changes in this release: + +* CAY-1626 Add JodaTime DateTime support +* CAY-1902 Implement resolving Db paths for DataObjects +* CAY-1991 More control over generated String property names +* CAY-1992 Allow to exclude DataMap java class from Modeler class generation +* CAY-1995 Add support for iterators to Select +* CAY-2001 Saving a display state of Project +* CAY-2004 EJBQL: Support for ordering on aggregate expressions +* CAY-2007 Refactoring SelectTranslator for better extensibility +* CAY-2008 Connection pool refactoring and validation query support in Cayenne DataSource +* CAY-2009 Non-blocking connection pool +* CAY-2010 DataSourceBuilder to help users create pooling and non-pooling DataSources +* CAY-2011 Support for Java 8 date and time types +* CAY-2012 ObjectSelect, SelectById: eliminating methods that reset query state +* CAY-2013 In-memory evaluation of DB expressions - non-id attributes +* CAY-2023 Decouple the use of ResourceLocator +* CAY-2025 Support for DBCP2 +* CAY-2026 Java 7 +* CAY-2027 Support for Expression outer join syntax in EJBQL +* CAY-2028 Wrap DataChannelFilter calls in the main transaction +* CAY-2029 Allow out-of-order insertion into DI lists +* CAY-2030 Capturing a stream of commit changes +* CAY-2035 Autobind items added to collections (Cayenne DI) +* CAY-2042 Remove an arbitrary limitation on 1000 runtime DbRelationships +* CAY-2043 ServerRuntimeBuilder: use DataDomain name for the default DataNode +* CAY-2044 Collection setter for to-many relationships +* CAY-2045 Add autosuggestion fields to choose attributes and relationships + +### Bug Fixes: + +* CAY-1977 Cleanup Modeler reverse engineering functionality +* CAY-1987 Widen types before performing in-memory evaluation of qualifiers using j.l.Number subclasses +* CAY-1990 Incorrect display of the raw SQL query in Modeler +* CAY-1993 Reverse Engineering does not work with PostgreSQL database +* CAY-1994 Modeler Migration Tool Shows No Changes +* CAY-1997 Difference in NULL handling inside the path between PropertyUtils and DataObject.readNestedProperty +* CAY-1998 Speeding up PropertyUtils +* CAY-1999 Unneeded Property import for superclasses with no properties +* CAY-2003 cdbimport doesn't work properly with several includeTable tags +* CAY-2015 Joint prefetches combined with DisjointById prefetches return null incorrectly +* CAY-2020 typo: correction to upper alpha range in Rot13PasswordEncoder +* CAY-2041 "cayenne.jdbc.max_connections" and "cayenne.jdbc.min_connections" command line options are ignored +* CAY-2047 Relationship mapping with target inheritance +* CAY-2049 Changing the Relationship name in ObjRelationship Inspector has no effect \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016-03-06-cayenne-40M5-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016-03-06-cayenne-40M5-released.md b/_posts/2016-03-06-cayenne-40M5-released.md new file mode 100644 index 0000000..e18fb46 --- /dev/null +++ b/_posts/2016-03-06-cayenne-40M5-released.md @@ -0,0 +1,104 @@ +--- +layout: post +title: Cayenne 4.0 Milestone 5 Released +date: 2016-3-6 +--- + +Apache Cayenne team is glad to announce the latest milestone of Cayenne - 4.0.M5. +The new release features a number of important things: + +* New fluent API for SQL functions (including long-awaited **aggregate** functions). +* Auto-loading of additional Cayenne modules. +* New JCache module that allows to easily include any compatible cache provider. +* Further improvements and stabilization of database reverse-engineering tools. +* Fixes bugs, updates docs, etc. + +Cayenne can be downloaded from [here](/download.html). Make sure to consult [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M5/docs/doc/src/main/resources/UPGRADE.txt) file before updating. + +Before we start discussing individual features, a few words on the future development effort. +Cayenne 4.0 is quickly approaching "beta" status. There's a good chance that the following release will be +feature-complete and we will enter "beta" and associated code freeze of the runtime framework. + +Now the new things in a bit more detail: + +### Fluent query API +These great additions to Fluent API are new in M5: + +*ColumnSelect* + + List<String> names = ObjectSelect.query(Artist.class) + .column(Artist.ARTIST_NAME).select(context); + +*Aggregate Functions* + + // easy way to select count + long count = ObjectSelect.query(Artist.class).selectCount(context); + +*GROUP BY .. HAVING* + + Property<Double> minPrice = Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).min(); + + // Object[0] is a name (String) + // Object[1] is a price (Double) + // GROUP BY clause is generated automatically based on the query semantics + List<Object[]> nameAndMinPrice = ObjectSelect.query(Artist.class) + .columns(Artist.ARTIST_NAME, minPrice) + .having(minPrice.gt(2000.0)) + .select(context); + +*SQL Functions* + + Property<Integer> nameLength = Artist.ARTIST_NAME.length(); + List<Artist> artists = ObjectSelect.query(Artist.class, nameLength.gt(5)) + .select(context); + + +### Reverse Engineering Improvements + +We pushed DB reverse engineering functionality further. This time in addition to clearing bugs and perform smoother importing +we changed cdbimport plugin configuration to make it clearer and ready for future improvements we have in mind. + +The plugin itself has changed it's name to *"cayenne-maven-plugin"*, so now you can use short commands like the following: + + mvn cayenne:cdbimport + +**_Important note_**: please refer to [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M5/docs/doc/src/main/resources/UPGRADE.txt) for detailed changes in _cdbimport_ configuration. + + +### A full list of changes in this release: + +* CAY-2139 Upgrade HSQLDB dependency to the most recent version (2.3.4) +* CAY-2150 Refactoring: ParameterBinding to contain ExtendedType property +* CAY-2163 Property.path() , ExpressionFactory.pathExp() +* CAY-2164 Relocate builder bootstrap methods from ServerRuntimeBuilder to ServerRuntime +* CAY-2165 Explicit "contribution" API for easier expansion of DI collections and maps +* CAY-2166 Auto-loading of Cayenne modules +* CAY-2168 Split DbLoader to parts and clean it up +* CAY-2169 Split DbMerger to parts and clean it up +* CAY-2170 MergeToken sorting is highly unstable +* CAY-2172 Cleanup Modeler import and migrate db actions +* CAY-2176 Java 7 diamond class generation templates +* CAY-2177 Sync auto generated state of PK between model and DB +* CAY-2187 Support for the scalar and aggregate SQL functions in ObjectSelect API +* CAY-2197 Update sqlite version and enable in-memory default config +* CAY-2212 cdbimport cleanup and configuration schema refactoring +* CAY-2223 JCacheQueryCache - a query cache provider to plug in JCache implementers +* CAY-2225 Extensible CacheInvalidationFilter logic +* CAY-2228 Deprecate multiple cache groups in caching and query API +* CAY-2231 Support for collections in new functional expressions and old math expressions +* CAY-2232 Proper conversion to String for new functional expressions +* CAY-2235 Deprecate Query.getDataMap() method + +### Bug Fixes: + +* CAY-2032 SelectAction: DistinctResultIterator ignores flattened relationships +* CAY-2137 When generating SQL from EJBQL, use "AND" to separate multiple join conditions +* CAY-2174 Change FK attribute name cause ObjAttribute appear after Reverse Engineering +* CAY-2175 AliasName used in EJBQLQuery is not working if it contains mixed case +* CAY-2183 Newly created DbRelationship is unexpectedly renamed by the Modeler +* CAY-2199 Modeler on Windows: The same project is displayed twice in "Recent Projects" +* CAY-2207 Modeler: "Java Type" and "DbAttribute Path" are not saved with using TAB to move forward +* CAY-2221 In-memory expression evaluation gives different result than select query +* CAY-2236 Modeler Migrate DB Schema: unable to Reverse All Operations +* CAY-2238 Modeler: Preserve manually set DbRelationship name when syncing with ObjEntity +* CAY-2242 Vertical Inheritance: Cannot Insert Record For Implementing Class with Attribute And Relationship http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016-05-16-cayenne-311-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016-05-16-cayenne-311-released.md b/_posts/2016-05-16-cayenne-311-released.md new file mode 100644 index 0000000..19025e8 --- /dev/null +++ b/_posts/2016-05-16-cayenne-311-released.md @@ -0,0 +1,24 @@ +--- +layout: post +title: Cayenne 3.1.1 Released +date: 2016-5-16 +--- + +This new maintenance release has a few major bug fixes and improvements. +It can be downloaded from [here](/download.html). + +### A full list of changes in this release: + +* CAY-1862 MySQL - allow specifying a length for TIMESTAMP and TIME columns +* CAY-2042 Remove an arbitrary limitation on 1000 runtime DbRelationships + +### Bug Fixes: + +* CAY-1863 Make determining whether a particular database type supports length adapter-specific not universal +* CAY-1964 Fix convertAdditionalDataMaps() in CayenneGeneratorMojo.java +* CAY-1973 error while generating classes +* CAY-1978 ESCAPE clause should be included in LIKE parenthesis +* CAY-1979 Prefetches on Many-to-Many Relationships with Longvarchar +* CAY-2047 Relationship mapping with target inheritance +* CAY-2049 Changing the Relationship name in ObjRelationship Inspector has no effect +* CAY-2066 Memory leak in ExtendedTypeMap for inner classes \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016-12-13-cayenne-40M4-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016-12-13-cayenne-40M4-released.md b/_posts/2016-12-13-cayenne-40M4-released.md new file mode 100644 index 0000000..5f48a0e --- /dev/null +++ b/_posts/2016-12-13-cayenne-40M4-released.md @@ -0,0 +1,147 @@ +--- +layout: post +title: Cayenne 4.0 Milestone 4 Released +date: 2016-12-13 +--- + +Apache Cayenne team is glad to announce the latest milestone of Cayenne - 4.0.M. The new release features a number of important things: + +* Stabilizes database reverse-engineering tools for DB-first ORM flow. +* Plugs holes and omissions in the fluent query API. +* Expands encryption capabilities to all data types. +* Improves transaction management API. +* Provides alternative binary protocols for ROP, greatly improving its performance. +* Includes a new Modeler welcome screen. +* Fixes numerous bugs, updates docs, etc., etc. + +Cayenne can be downloaded from [here](/download.html). Make sure to consult [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M4/docs/doc/src/main/resources/UPGRADE.txt) file before updating. + +Before we start discussing individual features, a few words on the future development effort. Cayenne 4.0 is quickly approaching "beta" status. There's a good chance that the following release will be feature-complete and we will enter "beta" and associated code freeze of the runtime framework. + +Now the new things in a bit more detail: + +### Fluent query API +These fluent queries are new in M4: + +*SQLExec* + + // insert + int inserted = SQLExec.query("INSERT INTO ARTIST (ARTIST_ID, ARTIST_NAME) " + + "VALUES (#bind($id), #bind($name))") + .paramsArray(55, "a3") + .update(context); + + // update + int updated = SQLExec + .query("UPDATE ARTIST SET ARTIST_NAME = 'b3' WHERE ARTIST_NAME = 'a3'") + .update(context); + +*MappedSelect* + + List<Artist> artists = MappedSelect.query("SelectArtists", Artist.class) + .param("name", "artist1") + .select(context); + +*MappedExec* + + int[] updated = MappedExec.query("UpdateArtists").param("name", "artist2").update(context); + +*ProcedureCall* + + // select + List<Artist> artists = ProcedureCall.query("select_sp", Artist.class) + .param("name", "Artist") + .param("paintingPrice", 3000) + .limit(2).select(context); + + // update + int updated = ProcedureCall.query("update_sp") + .param("paintingPrice", 3000).update(context); + + // call and get out parameters + int outParam = ProcedureCall.query("out_sp") + .param("name", "Artist") + .call(context).getOutParam("artist_out"); + +### Reverse Engineering Improvements + +There are a lot of improvements and bug fixes covering reverse engineering functionality (aka "DB-first flow"). There's still more work to do to make it perfect, but the API is starting to stabilize and the tools have already become very usable (as in actually used in production on many projects). Follow this [link](/docs/4.0/cayenne-guide/cayenne-guide-part4.html) to learn what DB-First flow is all about and how to use it. + +### Cayenne Crypto Improvements + +We've aded support for mapping encrypted columns to numbers, Strings, etc. + +### Transaction control + +Added TransactionListener to allow for better control of manual transactions. + +### ROP Improvements +With M4 it's much easier to plug external tools for ROP connectivity and serialization purposes. Jetty HTTP/1.1 and HTTP/2 Client and Protostuff have been already added to the Cayenne and are supported out of the box. + +### A full list of changes in this release: + +* CAY-2051 Applying new Reverse Engineering to the Modeler +* CAY-2053 SQLExec fluent query API +* CAY-2060 Replace Query objects in DataMap with query descriptors +* CAY-2062 MappedSelect and MappedExec fluent query API +* CAY-2063 ProcedureCall fluent query API +* CAY-2065 Pluggable serialization and connectivity layers for ROP +* CAY-2073 Ordering.orderedList methods +* CAY-2074 Support for catalogs in stored procedures +* CAY-2076 Implement Jetty HTTP/1.1 and HTTP/2 Client support for ROP Client +* CAY-2083 Implement Protostuff as serialization service for Cayenne ROP +* CAY-2090 Untangle HttpRemoteService from ServiceContext thread local setup +* CAY-2100 Add supporting generated keys for PostgreSQL +* CAY-2102 EJBQL: db: path not supported in select columns +* CAY-2103 cayenne-crypto: support for mapping non-String and non-binary types +* CAY-2106 cayenne-crypto: allow DI contribution of type converters inside ValueTransformerFactory +* CAY-2107 cayenne-crypto: Lazy initialization of crypto subsystem +* CAY-2111 Unbind transaction object from the current thread for iterated queries +* CAY-2112 Expose callback for "performInTransaction" +* CAY-2113 cdbimport: Reverse-engineering reinstates previously ignored columns +* CAY-2114 cdbimport: object layer settings are not respected +* CAY-2115 DbLoader - allow loading DataMap without Obj layer +* CAY-2116 Split schema synchronization code in a separate module +* CAY-2118 cdbimport: drop support for the old style of table filtering +* CAY-2129 Modeler: reengineer dialog improvements +* CAY-2130 Stripping common name prefixes on reverse engineering +* CAY-2132 Adding SybaseSelectTranslator to support TOP/DISTINCT TOP in limited queries +* CAY-2133 ObjectNameGenerator refactoring - unifying relationship name generation +* CAY-2135 cdbimport: reset DbEntity catalogs / schemas to DataMap defaults +* CAY-2136 Allow Ordering.orderedList(â¦) methods to accept a Collection rather than only a List +* CAY-2160 Modeler: new welcome screen + +### Bug Fixes: + +* CAY-2016 cdbimport: Rename table with toMany relationship causes migration error +* CAY-2064 Issue with BeanAccessor for classes with complex inheritance +* CAY-2066 Fixes for inner enums handling in ExtendedTypeMap +* CAY-2067 Cayenne 4.0 connection pool is occasionally running out of connections +* CAY-2070 Modeler sync function adds extraneous ObjRelationships inside the class hierarchy +* CAY-2078 Client code gen bug. Unnecessary DataMap class generation setting datamap gen to false. +* CAY-2080 Cayenne doesn't pick up reverse engineering file changes +* CAY-2084 ObjectIdQuery - no cache access polymorphism +* CAY-2086 SelectById.selectFirst stack overflow +* CAY-2087 PostCommitFilter is confused about changes made by Pre listeners +* CAY-2089 HTTP connections aren't always closed in new ROP implementation +* CAY-2097 NullPointerException while updating relationships for entities with vertical inheritance +* CAY-2101 DataContext.currentSnapshot() doesn't set snapshot entity name +* CAY-2105 Add missing elements to the reverseEngineering.xsd +* CAY-2108 cayenne-di: StackOverflow for decorator that takes Provider of the delegate +* CAY-2110 Obfuscated exception when processing iterated results +* CAY-2119 ProjectUpgrader test failure (Windows) +* CAY-2122 Vertical Inheritance: Cannot Insert Record For Implementing Class with Attribute And Relationship +* CAY-2125 SchemaUpdateStrategy doesn't work with multiple DataNodes +* CAY-2126 Modeler cannot upgrade project from v7 to v9 +* CAY-2128 Modeler stored procedures are not imported +* CAY-2131 Modeler NullPointerException in reverse engineering when importing different catalogs in one datamap +* CAY-2138 NVARCHAR, LONGNVARCHAR and NCLOB types are missing from Firebird types.xml +* CAY-2141 Disjoint-by-id prefetch generates repeating ID conditions +* CAY-2143 NPE in BaseSchemaUpdateStrategy +* CAY-2144 cdbimport always fails for databases which don't support catalogs +* CAY-2146 Vertical inheritance: record still inserted into parent db table when child validation fails +* CAY-2148 Failure upgrading from 3.1 to M4 +* CAY-2150 UI bug: PK generation custom sequence is getting reset +* CAY-2151 Migrate Database Schema: issue when no db is specified +* CAY-2153 Modeler Exception in save action after reverse engineering some complex DB schema +* CAY-2154 Migrate db: queries order \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016/02/cayenne-40m3-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016/02/cayenne-40m3-released.md b/_posts/2016/02/cayenne-40m3-released.md deleted file mode 100644 index 9664df2..0000000 --- a/_posts/2016/02/cayenne-40m3-released.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -layout: post -title: Cayenne 4.0 Milestone 3 Released -date: 2016-2-12 ---- - -This new milestone release has plenty of new features, bug fixes and other improvements. Below are just the main highlights. For more details check out the full release notes further down, as well as [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M3/docs/doc/src/main/resources/UPGRADE.txt). - -Cayenne can be downloaded from [here](/download.html). - -### Java 7 - -Since this milestone minimal Java version is 1.7. If you still need Java 1.6, you can use Cayenne 3.1 or 4.0.M2 until your application is able to upgrade. - -### Java 8 Date/Time and Joda-Time Support - -Cayenne now has two additional modules that contain ExtendedTypes for Java 8 Date/Time and Joda-Time support. You will need to add appropriate dependency and then create a coresponding module and add it to the ServerRuntime. For example: - - Module java8Module = new CayenneJava8Module(); - this.runtime = new ServerRuntime("cayenne-project.xml", java8Module); - -### Improvements in Query API - -All new fluent query classes (ObjectSelect, SQLSelect, SelectById) have the following new methods: - -* `List<T> select(ObjectContext context);` -* `T selectOne(ObjectContext context);` -* `T selectFirst(ObjectContext context);` -* `void iterate(ObjectContext context, ResultIteratorCallback<T> callback);` -* `ResultIterator<T> iterator(ObjectContext context);` -* `ResultBatchIterator<T> batchIterator(ObjectContext context, int size);` - -The "old" style SelectQuery is still supported and also includes these methods. - -Also ResultIterator and ResultBatchIterator are both AutoCloseable now. So you will be able to use try-with-resources with them. - -### Non-blocking DataSource - -Default Cayenne DataSource provider is switched to a non-blocking implementation that has a much better concurrency compared to the old version. - -### DBCP2 - -DBCPDataSourceFactory is now based on DBCP2 (which is required under Java 1.7 and newer). If you are using it, you will need to take a few steps to upgrade. For more details see [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M3/docs/doc/src/main/resources/UPGRADE.txt). - -### Capturing a stream of commit changes - -Sometimes it is very useful to capture all or parts of "commit log" for commits made through Cayenne (for audit purposes, etc). It has always been a challenge to do it in a consistent and convenient manner. We've made a few attempts to solve this before. M3 features new and the most comprehensive solution. There is a [PostCommitBuilder](https://github.com/apache/cayenne/blob/4.0.M3/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java) class that helps to create a special DI module with all required extensions for this to work. It allows to register [PostCommitListeners](https://github.com/apache/cayenne/blob/4.0.M3/cayenne-lifecycle/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java) that will receive an event on every commit, containing a full commit log object. - -### A full list of changes in this release: - -* CAY-1626 Add JodaTime DateTime support -* CAY-1902 Implement resolving Db paths for DataObjects -* CAY-1991 More control over generated String property names -* CAY-1992 Allow to exclude DataMap java class from Modeler class generation -* CAY-1995 Add support for iterators to Select -* CAY-2001 Saving a display state of Project -* CAY-2004 EJBQL: Support for ordering on aggregate expressions -* CAY-2007 Refactoring SelectTranslator for better extensibility -* CAY-2008 Connection pool refactoring and validation query support in Cayenne DataSource -* CAY-2009 Non-blocking connection pool -* CAY-2010 DataSourceBuilder to help users create pooling and non-pooling DataSources -* CAY-2011 Support for Java 8 date and time types -* CAY-2012 ObjectSelect, SelectById: eliminating methods that reset query state -* CAY-2013 In-memory evaluation of DB expressions - non-id attributes -* CAY-2023 Decouple the use of ResourceLocator -* CAY-2025 Support for DBCP2 -* CAY-2026 Java 7 -* CAY-2027 Support for Expression outer join syntax in EJBQL -* CAY-2028 Wrap DataChannelFilter calls in the main transaction -* CAY-2029 Allow out-of-order insertion into DI lists -* CAY-2030 Capturing a stream of commit changes -* CAY-2035 Autobind items added to collections (Cayenne DI) -* CAY-2042 Remove an arbitrary limitation on 1000 runtime DbRelationships -* CAY-2043 ServerRuntimeBuilder: use DataDomain name for the default DataNode -* CAY-2044 Collection setter for to-many relationships -* CAY-2045 Add autosuggestion fields to choose attributes and relationships - -### Bug Fixes: - -* CAY-1977 Cleanup Modeler reverse engineering functionality -* CAY-1987 Widen types before performing in-memory evaluation of qualifiers using j.l.Number subclasses -* CAY-1990 Incorrect display of the raw SQL query in Modeler -* CAY-1993 Reverse Engineering does not work with PostgreSQL database -* CAY-1994 Modeler Migration Tool Shows No Changes -* CAY-1997 Difference in NULL handling inside the path between PropertyUtils and DataObject.readNestedProperty -* CAY-1998 Speeding up PropertyUtils -* CAY-1999 Unneeded Property import for superclasses with no properties -* CAY-2003 cdbimport doesn't work properly with several includeTable tags -* CAY-2015 Joint prefetches combined with DisjointById prefetches return null incorrectly -* CAY-2020 typo: correction to upper alpha range in Rot13PasswordEncoder -* CAY-2041 "cayenne.jdbc.max_connections" and "cayenne.jdbc.min_connections" command line options are ignored -* CAY-2047 Relationship mapping with target inheritance -* CAY-2049 Changing the Relationship name in ObjRelationship Inspector has no effect \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016/05/cayenne-311-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016/05/cayenne-311-released.md b/_posts/2016/05/cayenne-311-released.md deleted file mode 100644 index 19025e8..0000000 --- a/_posts/2016/05/cayenne-311-released.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: post -title: Cayenne 3.1.1 Released -date: 2016-5-16 ---- - -This new maintenance release has a few major bug fixes and improvements. -It can be downloaded from [here](/download.html). - -### A full list of changes in this release: - -* CAY-1862 MySQL - allow specifying a length for TIMESTAMP and TIME columns -* CAY-2042 Remove an arbitrary limitation on 1000 runtime DbRelationships - -### Bug Fixes: - -* CAY-1863 Make determining whether a particular database type supports length adapter-specific not universal -* CAY-1964 Fix convertAdditionalDataMaps() in CayenneGeneratorMojo.java -* CAY-1973 error while generating classes -* CAY-1978 ESCAPE clause should be included in LIKE parenthesis -* CAY-1979 Prefetches on Many-to-Many Relationships with Longvarchar -* CAY-2047 Relationship mapping with target inheritance -* CAY-2049 Changing the Relationship name in ObjRelationship Inspector has no effect -* CAY-2066 Memory leak in ExtendedTypeMap for inner classes \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2016/12/cayenne-40M4-released.md ---------------------------------------------------------------------- diff --git a/_posts/2016/12/cayenne-40M4-released.md b/_posts/2016/12/cayenne-40M4-released.md deleted file mode 100644 index 5f48a0e..0000000 --- a/_posts/2016/12/cayenne-40M4-released.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -layout: post -title: Cayenne 4.0 Milestone 4 Released -date: 2016-12-13 ---- - -Apache Cayenne team is glad to announce the latest milestone of Cayenne - 4.0.M. The new release features a number of important things: - -* Stabilizes database reverse-engineering tools for DB-first ORM flow. -* Plugs holes and omissions in the fluent query API. -* Expands encryption capabilities to all data types. -* Improves transaction management API. -* Provides alternative binary protocols for ROP, greatly improving its performance. -* Includes a new Modeler welcome screen. -* Fixes numerous bugs, updates docs, etc., etc. - -Cayenne can be downloaded from [here](/download.html). Make sure to consult [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M4/docs/doc/src/main/resources/UPGRADE.txt) file before updating. - -Before we start discussing individual features, a few words on the future development effort. Cayenne 4.0 is quickly approaching "beta" status. There's a good chance that the following release will be feature-complete and we will enter "beta" and associated code freeze of the runtime framework. - -Now the new things in a bit more detail: - -### Fluent query API -These fluent queries are new in M4: - -*SQLExec* - - // insert - int inserted = SQLExec.query("INSERT INTO ARTIST (ARTIST_ID, ARTIST_NAME) " + - "VALUES (#bind($id), #bind($name))") - .paramsArray(55, "a3") - .update(context); - - // update - int updated = SQLExec - .query("UPDATE ARTIST SET ARTIST_NAME = 'b3' WHERE ARTIST_NAME = 'a3'") - .update(context); - -*MappedSelect* - - List<Artist> artists = MappedSelect.query("SelectArtists", Artist.class) - .param("name", "artist1") - .select(context); - -*MappedExec* - - int[] updated = MappedExec.query("UpdateArtists").param("name", "artist2").update(context); - -*ProcedureCall* - - // select - List<Artist> artists = ProcedureCall.query("select_sp", Artist.class) - .param("name", "Artist") - .param("paintingPrice", 3000) - .limit(2).select(context); - - // update - int updated = ProcedureCall.query("update_sp") - .param("paintingPrice", 3000).update(context); - - // call and get out parameters - int outParam = ProcedureCall.query("out_sp") - .param("name", "Artist") - .call(context).getOutParam("artist_out"); - -### Reverse Engineering Improvements - -There are a lot of improvements and bug fixes covering reverse engineering functionality (aka "DB-first flow"). There's still more work to do to make it perfect, but the API is starting to stabilize and the tools have already become very usable (as in actually used in production on many projects). Follow this [link](/docs/4.0/cayenne-guide/cayenne-guide-part4.html) to learn what DB-First flow is all about and how to use it. - -### Cayenne Crypto Improvements - -We've aded support for mapping encrypted columns to numbers, Strings, etc. - -### Transaction control - -Added TransactionListener to allow for better control of manual transactions. - -### ROP Improvements -With M4 it's much easier to plug external tools for ROP connectivity and serialization purposes. Jetty HTTP/1.1 and HTTP/2 Client and Protostuff have been already added to the Cayenne and are supported out of the box. - -### A full list of changes in this release: - -* CAY-2051 Applying new Reverse Engineering to the Modeler -* CAY-2053 SQLExec fluent query API -* CAY-2060 Replace Query objects in DataMap with query descriptors -* CAY-2062 MappedSelect and MappedExec fluent query API -* CAY-2063 ProcedureCall fluent query API -* CAY-2065 Pluggable serialization and connectivity layers for ROP -* CAY-2073 Ordering.orderedList methods -* CAY-2074 Support for catalogs in stored procedures -* CAY-2076 Implement Jetty HTTP/1.1 and HTTP/2 Client support for ROP Client -* CAY-2083 Implement Protostuff as serialization service for Cayenne ROP -* CAY-2090 Untangle HttpRemoteService from ServiceContext thread local setup -* CAY-2100 Add supporting generated keys for PostgreSQL -* CAY-2102 EJBQL: db: path not supported in select columns -* CAY-2103 cayenne-crypto: support for mapping non-String and non-binary types -* CAY-2106 cayenne-crypto: allow DI contribution of type converters inside ValueTransformerFactory -* CAY-2107 cayenne-crypto: Lazy initialization of crypto subsystem -* CAY-2111 Unbind transaction object from the current thread for iterated queries -* CAY-2112 Expose callback for "performInTransaction" -* CAY-2113 cdbimport: Reverse-engineering reinstates previously ignored columns -* CAY-2114 cdbimport: object layer settings are not respected -* CAY-2115 DbLoader - allow loading DataMap without Obj layer -* CAY-2116 Split schema synchronization code in a separate module -* CAY-2118 cdbimport: drop support for the old style of table filtering -* CAY-2129 Modeler: reengineer dialog improvements -* CAY-2130 Stripping common name prefixes on reverse engineering -* CAY-2132 Adding SybaseSelectTranslator to support TOP/DISTINCT TOP in limited queries -* CAY-2133 ObjectNameGenerator refactoring - unifying relationship name generation -* CAY-2135 cdbimport: reset DbEntity catalogs / schemas to DataMap defaults -* CAY-2136 Allow Ordering.orderedList(â¦) methods to accept a Collection rather than only a List -* CAY-2160 Modeler: new welcome screen - -### Bug Fixes: - -* CAY-2016 cdbimport: Rename table with toMany relationship causes migration error -* CAY-2064 Issue with BeanAccessor for classes with complex inheritance -* CAY-2066 Fixes for inner enums handling in ExtendedTypeMap -* CAY-2067 Cayenne 4.0 connection pool is occasionally running out of connections -* CAY-2070 Modeler sync function adds extraneous ObjRelationships inside the class hierarchy -* CAY-2078 Client code gen bug. Unnecessary DataMap class generation setting datamap gen to false. -* CAY-2080 Cayenne doesn't pick up reverse engineering file changes -* CAY-2084 ObjectIdQuery - no cache access polymorphism -* CAY-2086 SelectById.selectFirst stack overflow -* CAY-2087 PostCommitFilter is confused about changes made by Pre listeners -* CAY-2089 HTTP connections aren't always closed in new ROP implementation -* CAY-2097 NullPointerException while updating relationships for entities with vertical inheritance -* CAY-2101 DataContext.currentSnapshot() doesn't set snapshot entity name -* CAY-2105 Add missing elements to the reverseEngineering.xsd -* CAY-2108 cayenne-di: StackOverflow for decorator that takes Provider of the delegate -* CAY-2110 Obfuscated exception when processing iterated results -* CAY-2119 ProjectUpgrader test failure (Windows) -* CAY-2122 Vertical Inheritance: Cannot Insert Record For Implementing Class with Attribute And Relationship -* CAY-2125 SchemaUpdateStrategy doesn't work with multiple DataNodes -* CAY-2126 Modeler cannot upgrade project from v7 to v9 -* CAY-2128 Modeler stored procedures are not imported -* CAY-2131 Modeler NullPointerException in reverse engineering when importing different catalogs in one datamap -* CAY-2138 NVARCHAR, LONGNVARCHAR and NCLOB types are missing from Firebird types.xml -* CAY-2141 Disjoint-by-id prefetch generates repeating ID conditions -* CAY-2143 NPE in BaseSchemaUpdateStrategy -* CAY-2144 cdbimport always fails for databases which don't support catalogs -* CAY-2146 Vertical inheritance: record still inserted into parent db table when child validation fails -* CAY-2148 Failure upgrading from 3.1 to M4 -* CAY-2150 UI bug: PK generation custom sequence is getting reset -* CAY-2151 Migrate Database Schema: issue when no db is specified -* CAY-2153 Modeler Exception in save action after reverse engineering some complex DB schema -* CAY-2154 Migrate db: queries order \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/630c9b22/_posts/2017/03/cayenne-40M5-released.md ---------------------------------------------------------------------- diff --git a/_posts/2017/03/cayenne-40M5-released.md b/_posts/2017/03/cayenne-40M5-released.md deleted file mode 100644 index e18fb46..0000000 --- a/_posts/2017/03/cayenne-40M5-released.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -layout: post -title: Cayenne 4.0 Milestone 5 Released -date: 2016-3-6 ---- - -Apache Cayenne team is glad to announce the latest milestone of Cayenne - 4.0.M5. -The new release features a number of important things: - -* New fluent API for SQL functions (including long-awaited **aggregate** functions). -* Auto-loading of additional Cayenne modules. -* New JCache module that allows to easily include any compatible cache provider. -* Further improvements and stabilization of database reverse-engineering tools. -* Fixes bugs, updates docs, etc. - -Cayenne can be downloaded from [here](/download.html). Make sure to consult [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M5/docs/doc/src/main/resources/UPGRADE.txt) file before updating. - -Before we start discussing individual features, a few words on the future development effort. -Cayenne 4.0 is quickly approaching "beta" status. There's a good chance that the following release will be -feature-complete and we will enter "beta" and associated code freeze of the runtime framework. - -Now the new things in a bit more detail: - -### Fluent query API -These great additions to Fluent API are new in M5: - -*ColumnSelect* - - List<String> names = ObjectSelect.query(Artist.class) - .column(Artist.ARTIST_NAME).select(context); - -*Aggregate Functions* - - // easy way to select count - long count = ObjectSelect.query(Artist.class).selectCount(context); - -*GROUP BY .. HAVING* - - Property<Double> minPrice = Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).min(); - - // Object[0] is a name (String) - // Object[1] is a price (Double) - // GROUP BY clause is generated automatically based on the query semantics - List<Object[]> nameAndMinPrice = ObjectSelect.query(Artist.class) - .columns(Artist.ARTIST_NAME, minPrice) - .having(minPrice.gt(2000.0)) - .select(context); - -*SQL Functions* - - Property<Integer> nameLength = Artist.ARTIST_NAME.length(); - List<Artist> artists = ObjectSelect.query(Artist.class, nameLength.gt(5)) - .select(context); - - -### Reverse Engineering Improvements - -We pushed DB reverse engineering functionality further. This time in addition to clearing bugs and perform smoother importing -we changed cdbimport plugin configuration to make it clearer and ready for future improvements we have in mind. - -The plugin itself has changed it's name to *"cayenne-maven-plugin"*, so now you can use short commands like the following: - - mvn cayenne:cdbimport - -**_Important note_**: please refer to [UPGRADE.txt](https://github.com/apache/cayenne/blob/4.0.M5/docs/doc/src/main/resources/UPGRADE.txt) for detailed changes in _cdbimport_ configuration. - - -### A full list of changes in this release: - -* CAY-2139 Upgrade HSQLDB dependency to the most recent version (2.3.4) -* CAY-2150 Refactoring: ParameterBinding to contain ExtendedType property -* CAY-2163 Property.path() , ExpressionFactory.pathExp() -* CAY-2164 Relocate builder bootstrap methods from ServerRuntimeBuilder to ServerRuntime -* CAY-2165 Explicit "contribution" API for easier expansion of DI collections and maps -* CAY-2166 Auto-loading of Cayenne modules -* CAY-2168 Split DbLoader to parts and clean it up -* CAY-2169 Split DbMerger to parts and clean it up -* CAY-2170 MergeToken sorting is highly unstable -* CAY-2172 Cleanup Modeler import and migrate db actions -* CAY-2176 Java 7 diamond class generation templates -* CAY-2177 Sync auto generated state of PK between model and DB -* CAY-2187 Support for the scalar and aggregate SQL functions in ObjectSelect API -* CAY-2197 Update sqlite version and enable in-memory default config -* CAY-2212 cdbimport cleanup and configuration schema refactoring -* CAY-2223 JCacheQueryCache - a query cache provider to plug in JCache implementers -* CAY-2225 Extensible CacheInvalidationFilter logic -* CAY-2228 Deprecate multiple cache groups in caching and query API -* CAY-2231 Support for collections in new functional expressions and old math expressions -* CAY-2232 Proper conversion to String for new functional expressions -* CAY-2235 Deprecate Query.getDataMap() method - -### Bug Fixes: - -* CAY-2032 SelectAction: DistinctResultIterator ignores flattened relationships -* CAY-2137 When generating SQL from EJBQL, use "AND" to separate multiple join conditions -* CAY-2174 Change FK attribute name cause ObjAttribute appear after Reverse Engineering -* CAY-2175 AliasName used in EJBQLQuery is not working if it contains mixed case -* CAY-2183 Newly created DbRelationship is unexpectedly renamed by the Modeler -* CAY-2199 Modeler on Windows: The same project is displayed twice in "Recent Projects" -* CAY-2207 Modeler: "Java Type" and "DbAttribute Path" are not saved with using TAB to move forward -* CAY-2221 In-memory expression evaluation gives different result than select query -* CAY-2236 Modeler Migrate DB Schema: unable to Reverse All Operations -* CAY-2238 Modeler: Preserve manually set DbRelationship name when syncing with ObjEntity -* CAY-2242 Vertical Inheritance: Cannot Insert Record For Implementing Class with Attribute And Relationship