Seeking to automate generation the cayenne schema

From: Craig Turner (crai..ynect.com)
Date: Tue Apr 04 2006 - 04:24:35 EDT

  • Next message: Andrus Adamchik: "Re: Seeking to automate generation the cayenne schema"

    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 com.base.of.java.package

    For this paticular operation I'd like to be able to do this: sf create project name com.base.of.java.package 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 :)



    This archive was generated by hypermail 2.0.0 : Tue Apr 04 2006 - 04:58:40 EDT