Guide to 3.0 FeaturesPage edited by Andrus AdamchikThis page highlights the new features and changes introduced in 3.0 release, roughly corresponding to the latest released milestone. It is a high level overview and as such is by no means complete. Consult RELEASE-NOTES.txt file included in each release for the full list of changes.
Distribution Contents Structure
Cayenne JPA ProviderNote that Cayenne JPA provider work has been frozen and it IS NOT included in 3.0. If you have further questions or would like to give a hand with the JPA work, please send a note to developer mailing list. Object Relational MappingKilled DerivedDbEntity ConceptStopped supporting DerivedDbEntity - its functionality (aggregate queries) is achieved via EJBQL and other means. DataMap DTD Replaced with SchemaA schema is now available here for the DataMap XML format. Embeddables(as of M6 there's no Modeler support) Added a new mapping artifact - Embeddable, that allows to map composite objects to a single table. Flattened Attributes(as of M6 there's no Modeler support) Just like with "flattened" relationships, now there is a way to map an ObjAttribute that spans one or more DbRelationships and is mapped to a column of a joined table. Persisting Primitives and a Number of Other Simple PropertiesDataObjects are now allowed to have primitive properties, such as int, boolean, etc. Also Cayenne can now persist the following extra simple property types: java.util.Calendar, java.math.BigInteger, java.io.Serializable, char[], java.lang.Character, java.lang.Character[], java.lang.Byte[]. Support for To-Many Relationship Maps and Collections.In addition to mapping a to-many relationship as a List, Cayenne now supports to-many Maps (keyed by target object pk, or an arbitrary unique property), Sets and generic Collections. Note that relationship maps is the only conceptually new type of relationships. Collection and Set are not that different from the earlier List behavior (that was a Collection, and just like Set ensured uniqueness of its objects). Support for "extended" Enums MappingIn addition to vanilla Java enums, Cayenne allows enums to provide a custom database value for each enumerated instance by implementing org.apache.cayenne.ExtendedEnumeration. This way a persistent value doesn't have to be tied to the enum Java name or position. DbAttribute Scale and PrecisionChanged DbAttribute "precision" property to "scale" (as it meant scale all along) and added a separate "precision" attribute to track precision. Cayenne Persistence APIJava 5 MigrationCayenne now requires Java 5 or newer to run. This allowed us to start using generics, enums and other Java 5 features. ObjectContextWhile you can still use DataContext directly, we encourage you to avoid direct dependency on DataContext throughout your code, and instead use org.apache.cayenne.ObjectContext interface. E.g.: ObjectContext context = DataContext.createDataContext();
Entity Lifecycle CallbacksCayenne lifecycle callbacks are similar to callbacks defined in the JPA specification. This is a feature that allows to perform custom operations at certain points in the object lifecycle. For more details see this page. General Query Improvements
DataContext ChangesImplemented DataContext.rollbackChangesLocally(). This was missing in 2.0, limiting the operation of the nested DataContexts. Cache Management
_expression_ Improvements
Database Integration Changes/Improvements
Class Generation Improvements
Prefetching Improvements
POJO Persistence(status: experimental. Unlikely to be production ready in 3.0) Remote Object PersistenceValidation callbacks support for ROP ObjectContextNow object validation works the same way on the ROP client as it did on the server. Nested contexts support for ROP ObjectContextNested contexts can now be created for ROP contexts. Creation method is added to ObjectContext interface. CayenneModelerThe Modeler underwent significant changes with the goal to improve usability and look-and-feel.
Deployment and RuntimeImproved Performance
Improved Memory Management
Logging Switched to commons-logging from Log4JCayenne no longer has a Log4J dependency. Instead it uses Jakarta commons-logging, as described here. Note that 2.0 Log4J configurations should continue to work, although now it is a user responsibility to bootstrap Log4J - Cayenne will no longer do it for you. E.g. you can do this on startup: org.apache.log4j.PropertyConfigurator.configure("cayenne-log.properties");
Optional Quoting of SQL IdentifiersCayenne now supports optional quoting of SQL identifiers in the generated SQL. This has been a very popular request in the past. Identifier quoting can be turned on per DataMap in the Modeler (look for "Quote SQL Identifiers" checkbox). This will allow to map column names that contain spaces, non-ascii characters, reserved words, etc., i.e. the schemas that could not be mapped with Cayenne before. Ability to Detect Missing/Partial Schema and Auto Generate Schema in Runtime(status: as of M6 column consistency checks) DataNode has a new attribute in the Modeler - "Schema Update Strategy". This allows to specify runtime behavior in regards to schema consistency checking. The default behavior is "do nothing" (org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy). Alternatively Cayenne can create the schema if none is found or throw an exception if schema inconsistencies are detected. Tools
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Features confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence
- [CONF] Apache Cayenne Documentation > Guide to 3.0 Feat... confluence