Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DF81B200C03 for ; Fri, 6 Jan 2017 20:19:28 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DE3A3160B37; Fri, 6 Jan 2017 19:19:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8E2D5160B4D for ; Fri, 6 Jan 2017 20:19:27 +0100 (CET) Received: (qmail 89690 invoked by uid 500); 6 Jan 2017 19:19:26 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 89664 invoked by uid 99); 6 Jan 2017 19:19:26 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2017 19:19:26 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 69C0C3A2300 for ; Fri, 6 Jan 2017 19:19:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004302 [9/41] - in /websites/production/openjpa/content/builds/2.4.2: ./ apache-openjpa/ apache-openjpa/docs/ apache-openjpa/docs/css/ apache-openjpa/docs/img/ Date: Fri, 06 Jan 2017 19:19:22 -0000 To: commits@openjpa.apache.org From: ilgrosso@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170106191925.69C0C3A2300@svn01-us-west.apache.org> archived-at: Fri, 06 Jan 2017 19:19:29 -0000 Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/introduction.html ============================================================================== --- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/introduction.html (added) +++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/introduction.html Fri Jan 6 19:19:20 2017 @@ -0,0 +1,25 @@ + + + Part 1. Introduction \ No newline at end of file Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.2.html ============================================================================== --- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.2.html (added) +++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.2.html Fri Jan 6 19:19:20 2017 @@ -0,0 +1,207 @@ + + + 2.  OpenJPA 2.2.0

2.  + OpenJPA 2.2.0 +

+ +

2.1. Incompatibilities

+ +

+ The following sections indicate changes that are incompatible + between OpenJPA 2.1.x releases and the 2.2.0 release. +

+

2.1.1.  + allocationSize Property of Sequence Generator +

+ + +

+ In previous releases, specifying the allocationSize property of + sequence generator + affected only sequence definition in the database. During + schema creation, the INCREMENT BY clause of + CREATE SEQUENCE statement always + had a value of 1 and on DB2, Oracle and PostgreSQL databases a CACHE clause + was added with the value of allocationSize property. Such a statement caused + sequence values being cached in the database. Starting with OpenJPA 2.2.0, + sequence values are cached in the jvm memory and the allocationSize + property determines size of that cache. The CACHE clause is no longer used, + instead the INCREMENT BY clause gets its value equal to the + allocationSize property. Such a strategy reduces the number of database roundtrips + required for retrieving sequence values considerably. +

+

+ In order for the existing applications to work with OpenJPA + 2.2.0, you have to manually recreate or redefine sequences, specifying + the correct INCREMENT BY value and, possibly, correct initial sequence value. + Note that the default value of the allocationSize property is 50 and that + value is used if the property is not specified. +

+

+ The requirement for sequence modification applies to all databases that support sequences, regardless of + the CACHE clause being supported. The only exception is Firebird database - + since with this database the increment step is determined during sequence + value fetch, no migration activity is needed. +

+

+ To maintain the old behavior of sequence generator in OpenJPA 2.2.0, you can: +

  • +

    + Set the allocationSize property value to 1. +

    +
  • +

    + Additionally, if the CACHE clause has to be emitted in sequence definition, + this can be accomplished by overriding the + + DBDictionary.getCreateSequenceSQL method. +

    +

+

+
+

2.1.2.  + MetaModel Attributes for Arrays +

+ + +

+ In previous releases OpenJPA's MetaModel implementation generated a ListAttribute for every array. This behavior is correct if the array + is annotated as a PersistentCollection, but not correct for un-annotated arrays (e.g. byte[], char[]). In OpenJPA 2.2.0 this behavior was corrected + so that arrays which are not stored as PersistentCollections will use a SingularAttribute instead of a ListAttribute. +

+

+ If your application uses the MetaModel API and your entities contain arrays of any of the following types: byte[], Byte[], char[], Character[] and + do not use the @PersistentCollection annotation with those fields you will need to update your application to use OpenJPA 2.2.0. +

+

In order for the existing applications to work with OpenJPA you may: +

  • +

    Regenerate the canonical metamodel classes

    +
  • +

    Set the Compatibility property UseListAttributeForArrays to true in persistence.xml +

     <property name="openjpa.Compatibility" value="UseListAttributeForArrays=true"/>

    +

    +

+

+
+

2.1.3.  + supportsSetClob Property. +

+ + +

+ In OpenJPA 2.2.0, code was added to allow the setting of CLOB or XML data larger than 4000 bytes. This functionality + was eventually back ported to previous releases, and enabled by the supportsSetClob property on the OracleDictionary. Setting this property + has no effect in 2.2.0 and later releases and any occurrence of it should be removed. +

+
+

2.1.4.  + useNativeSequenceCache Property. +

+ + +

+ In OpenJPA 2.2.0, code was added which changed the way sequences were generated, please see + Section 2.1.1, “ + allocationSize Property of Sequence Generator + ” for details. This functionality was eventually back ported + to previous releases, and enabled by the useNativeSequenceCache property on the DBDictionary. Setting this property + has no effect in 2.2.0 and later releases and any occurrence of it should be removed. If previous behavior is + desired (i.e. useNativeSequenceCache=true), please see the details described in section + Section 2.1.1, “ + allocationSize Property of Sequence Generator + ”. +

+
+

2.1.5.  + Cascade persist behavior +

+ + +

+ In previous releases, OpenJPA would check the database for the + existence of the related Entity before persisting the relationship to + that Entity. This resulted in an extra Select being sent to the + database. In 2.2.0, code was added so that when cascading a persist to + a related Entity without persistence state, the persist (insert) will + happen without first checking the database. This may result in an + EntityExistsException if the related Entity already exists in the + database. To revert this behavior to the previous release, set the + value of the openjpa.Compatibility + property CheckDatabaseForCascadePersistToDetachedEntity + to true. +

+
+

2.1.6.  + Life Cycle Event Manager Callback Behavior +

+ + +

+ Life cycle event manager is used to manage entity's life cycle event callback. + In previous releases, Life cycle event manager is scoped to EntityManagerFactory. + This means listeners registered to an individual EntityManager may get life cycle + event callbacks for entity that it does not manage. +

+

+ From 2.2.1 release, the default callback behavior of the life cycle event manager + is changed to scope to each EntityManager. + To revert this behavior to the previous release, set the + value of the openjpa.Compatibility + property SingletonLifecycleEventManager + to true. +

+
+

2.1.7.  + shared-cache-mode Property +

+ + +

+ In the previous release, when the shared-cache-mode is enabled and the DataCache property is not set + or set to false, there will be no data caching. +

+

+ From 2.2.2 release, the caching will be turned on if the shared-cache-mode is enabled. Please see the + details described in section Section 1.1.2, “ + Integration with JPA standard shared cache mode + ”. +

+
+
+
\ No newline at end of file Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.3.html ============================================================================== --- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.3.html (added) +++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/jpa_2.3.html Fri Jan 6 19:19:20 2017 @@ -0,0 +1,85 @@ + + + 3.  OpenJPA 2.3.0

3.  + OpenJPA 2.3.0 +

+ +

3.1. Incompatibilities

+ +

+ The following sections indicate changes that are incompatible + between OpenJPA 2.2.x releases and the 2.3.0 release. +

+

3.1.1.  + MappingTool Behavior for DB2 and Derby +

+ +

+ In previous releases, the MappingTool mapped java.math.BigDecimal fields to the database type + DOUBLE, and as such, ignored column and precision values that might have been specified via the + javax.persistence.Column annotation. +

+

+ From the 2.3.0 release, java.math.BigDecimal fields are now mapped to the database type DECIMAL + and it is very likely that you will need to specify column and precision via + the javax.persistence.Column annotation. +

+
+

3.1.2.  + RequiresSearchStringEscapeForLike DBDictionary Property +

+ + +

+ In previous releases, the default value for the property RequiresSearchStringEscapeForLike is true and caused the + unexpected escape clause appended to the SQL statement. + For example, user created a named query like this: +

 SELECT o.computerName FROM CompUser o WHERE o.name LIKE ?

+ At run time the following query is generated: +

 SELECT t0.computerName FROM CompUser t0 WHERE (t0.name LIKE ? ESCAPE '\')

+ ESCAPE '\' shouldn't be appended to the query. +

+

+ From the 2.3.0 release, RequiresSearchStringEscapeForLike property is set to false by default. You can configure + RequiresSearchStringEscapeForLike property to be true if the old behavior is desired. +

+
+

3.1.3.  + Return value of aggregate functions in SELECT clause +

+ + +

+ The JPA specification states "If SUM, AVG, MAX, or MIN is used, and there are no values to which the aggregate function can be + applied, the result of the aggregate function is NULL." Prior to this update, OpenJPA incorrectly returned 0 for SUM, AVG, MIN, + and MAX when a state field being aggregated is numeric. This behavior affects both JPQL and Criteria queries. With this update, + OpenJPA will return a null result value for these aggregate functions when a query returns no result. +

+

+ To re-enable the prior behavior, you need to set the following persistence property in your persistence.xml or when + creating an EntityManagerFactory. +

+    <property name="openjpa.Compatibility" value="ReturnNullOnAggregateResult=false"/>
+                    

+

+
+
+
\ No newline at end of file