cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@synect.com
Subject Re: Seeking to automate generation the cayenne schema
Date Sat, 08 Apr 2006 18:30:08 GMT
> 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



Mime
View raw message