Hi,

> All,
>
>     I noticed these targets in the build.xml file.  Do these applications
> work in that I can select tables from my existing database and have it
> generate the initial XML config file for OJB?  If so, which one is best?  I
> have tried to play with them with no success.

We are also using reverse engineering, our db model is very large and complex and we 
have a good db-design tool, so we prefere to adopt this way...
I got a look to reverse-db tools, however i have the impression they are still too 
'young' and doesn't give me enough freedom on the model generation process.
If you look into the build-torque.xml ant script, you will find targets for generating 
repository and model from a jdbc connection. However I started with RC3 and the 
velocity templates used for the repository/java code generation were still quite buggy 
(Maybe they are better now in RC4).
I did several modification, so now we can generate the repository and the java code 
formatted as we want and with several useful features already added to the model 
classes.
Drawback is that the templates we are using now are no longer globally usable :( but 
we spare lot of time, everytime there is a change in the database model.
So if you have the possibility to invest 3 or 4 days, you can adapt the velocity 
templates (and maybe the ant script) to your application.
In our case, for every db-table we have 2 classes, a base class that is always 
regenerated by the build script and only defines the setters/getters and a couple of 
constructors,
the second class extends the base one and is only created once, in this class you can 
put some more code to simplify access to the data (conversions and other utility 
methods)

hope i helped you
bye
danilo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to