cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Kolonitsky (JIRA)" <>
Subject [jira] [Created] (CAY-1946) CDbimport improvements
Date Thu, 28 Aug 2014 09:02:13 GMT
Alex Kolonitsky created CAY-1946:

             Summary: CDbimport improvements
                 Key: CAY-1946
             Project: Cayenne
          Issue Type: Improvement
          Components: Non-GUI Tools
            Reporter: Alex Kolonitsky

We’ve experimented with automated db-first approach to Cayenne modeling for more than a
year on a set of client projects. Roughly this approach means that DB evolution is managed
via external tools (e.g. liquibase) and Cayenne artifacts are managed using the following
POM configuration:


“cdbimport” ensures that Cayenne model is always in sync with DB, “cgen” - that Java
classes are in sync with the model. There are zero problems with “cgen", not so with “cdbimport".
If you control the schema, you get a decently named Java classes/properties in 95% of the
cases. Here we are trying to address the remaining 5% that make things ugly:

* Inability to generate meaningful relationship names in many cases.
* Inability to customize attribute/relationship names and data types.

To solve this here we are proposing a merge algorithm that would preserve customizations to
the Obj* layer made by the user. And in addition to that a special descriptor that can be
used for more advanced filtering and customization of cdbimport process. Both of these improvements
will hopefully result in “cdbimport” becoming a tool of choice for Cayenne work for many

This message was sent by Atlassian JIRA

View raw message