You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2014/11/27 08:18:13 UTC
[jira] [Closed] (CAY-1946) CDbimport improvements
[ https://issues.apache.org/jira/browse/CAY-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik closed CAY-1946.
--------------------------------
Resolution: Fixed
Fix Version/s: 4.0.M2
This is done. Great job, Alex!
We'll separately work on documentation, UPGRADE notes and some related modeler tweaks.
> CDbimport improvements
> ----------------------
>
> Key: CAY-1946
> URL: https://issues.apache.org/jira/browse/CAY-1946
> Project: Cayenne
> Issue Type: Improvement
> Components: Non-GUI Tools
> Reporter: Alex Kolonitsky
> Fix For: 4.0.M2
>
>
> 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:
> <plugin>
> <groupId>org.apache.cayenne.plugins</groupId>
> <artifactId>maven-cayenne-plugin</artifactId>
> <configuration>
> ...
> </configuration>
> <executions>
> <execution>
> <id>default-cli</id>
> <goals>
> <goal>cdbimport</goal>
> <goal>cgen</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> “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 users.
> https://docs.google.com/document/d/1DF5-_mMDCuH7iUFhEFDm2q-ebVeSPgvOaymho88ywJ0/edit?pli=1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)