cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CAY-1946) CDbimport improvements
Date Sun, 07 Sep 2014 13:15:28 GMT


ASF GitHub Bot commented on CAY-1946:

Github user AlexKolonitsky closed the pull request at:

> CDbimport improvements
> ----------------------
>                 Key: CAY-1946
>                 URL:
>             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:
> <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.

This message was sent by Atlassian JIRA

View raw message