cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Turner <>
Subject Seeking to automate generation the cayenne schema
Date Tue, 04 Apr 2006 08:24:35 GMT
In short: is there a command-line or API-driven way of creating a 
cayenne configuration by pointing at an existing schema or is the 
modeler the only supported approach? Cgen should be OK for generating 
the classes, but I'm interested in an earlier step - generating the XML 
configuration itself.


I'm in the process of writing a framework with cayenne 1.2 as one of the 
components [1]. It's driven from the command-line. Eg:
   sf create project name

For this paticular operation I'd like to be able to do this:
   sf create project name jdbc:uri com.db.Driver

It's my intention that this should create a project of the supplied name 
and base backage and generate a cayenne setup based on the supplied url 
and database driver.

Is it straightforward to generate a configuration this way with existing 
tools? I'm guessing it won't be too difficult to either hack the modeler 
to do this without user interaction or else generate my own XML based on 
JDBC inspection, but I'd far prefer to do it through a supported 
approach if one is available.

   - C

[1] I'm writing it in python. The other main dependencies are tapestry 4 
and tomcat. Some readers may notice a passing resemblance to a certain 
set of perl-based webobjects tools :)

View raw message