Re: Seeking to automate generation the cayenne schema

From: crai..ynect.com
Date: Sat Apr 08 2006 - 14:30:08 EDT

  • Next message: Cris Daniluk: "Re: reverse engineering a postgresql database: no relationships detected?"

    > On Apr 8, 2006, at 7:47 AM, Craig Turner wrote:
    > Craig,
    >
    > I still need to take a look at the code before making any general
    > comments. One thing - I may have indeed misunderstood what the tool
    > does, as Mike said. There is an existing code in Cayenne to write
    > cayenne.xml - ConfigSaver class. DataMap is stored by using
    > DataMap.encodeAsXML(..).

    I've tidied this project up a bit and made some of the changes you've
    suggested (discussed below). I've put a new version of the source up at
    the same location,
      http://203.15.93.19/GenerateModelTool.tar.gz

    I was able to use ConfigSaver to generate my node information, but not the
    cayenne.xml. Some of the methods in ConfigSaver that I'd like to use have
    protected access (eg: storeDomain). Calling storeDomains leads to a
    NullPointerException,

    Exception in thread "main" java.lang.NullPointerException
            at
    org.objectstyle.cayenne.conf.ConfigSaver.storeDomains(ConfigSaver.java:94)
            at GenerateModel.generateCayenneXml(GenerateModel.java:203)
            at GenerateModel.go(GenerateModel.java:109)
            at GenerateModel.main(GenerateModel.java:67)

    It's now using AutoAdapter as you recommended in your other email.

    I think your suggestion of making this an ant task to completement cdbgen
    is good and I'll have a think about putting a frontend on it for this
    purpose next. I think it has value as a command-line tool also, though.

      - C



    This archive was generated by hypermail 2.0.0 : Sat Apr 08 2006 - 14:30:34 EDT