db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <t...@apache.org>
Subject Re: AutoBuildDb proposals
Date Fri, 03 Jan 2003 11:16:24 GMT
Hi Jason,

Jason Rosen wrote:
 > Hi,
 >
 > I just recently joined the OJB dev list after experimenting a bit
 > with OJB for my own project.
 >
 > What is the goal of the AutoBuildDB tool?

It can generate database tables on the fly from the metadata information.
Say you hava class Person and a ClassDescriptor defining a mapping for 
this class. The ClassDescriptor defines that Person is mapped to a table 
PERSON. But this table is not yet created in the db.

Without the autoBuildDB tool a call to PB.store(person) would simply 
crash as the table does not exist.
But with this feature the PERSON table is created on the fly!

 >
 > I have created some XSL templates that can build an OJB
 > repository.xml file from Torque database schema XML files and then
 > another one to create OJB persistence classes from the repository.xml
 > file.  I also have ANT tasks defined to build my DB using Torque,
 > generate the repository.xml file, generate the persistence classes,
 > compile the classes, and jar them up ready to use.

This scripts could also be helpful for others! are you willing to share 
them?

 >
 > Right now my XSL transforms are quite rough, but they are successful
 > in parsing foreign-key relations defined in the Torque XML schema to
 > create 1:1, 1:n, and m:n non-decomposed object relationships within
 > the repository.xml and the generated persistence classes.  I have
 > started a new project using these tools as a foundation for managing
 > my DB and persistence classes, and it seems to be working for most
 > cases I have run into using postgreSQL.
 >
 > So I am wondering how this fits into the goals of the AutoBuildDB
 > tool to see if I can contribute.
 >

Your scripts can be helpful for "compile-time" operations to create 
repository persistent classes and database tables. This is also very 
important functionality, not yet covered by our stuff!

The AUtobuildDB feature is a "run-time" feature, that does not rely on 
XSL transformations, but works on the OJB internal metadata objects 
(DescriptorRepository, ClassDescriptor, ...) directly. So IMHO your 
scripts won't help much here.

cheers,
Thomas

 > Thanks, Jason
 >
 > -----Original Message----- From: Armin Waibel
 > [mailto:armin@code-au-lait.de] Sent: Thursday, January 02, 2003 11:20
 > AM To: OJB Developers List Subject: Re: AutoBuildDb proposals
 >
 >
 > Hi again,
 >
 > ----- Original Message ----- From: "Davide Mora" <d_mora@yahoo.com>
 > To: <ojb-dev@jakarta.apache.org> Sent: Thursday, January 02, 2003
 > 4:50 PM Subject: AutoBuildDb proposals
 >
 >
 >
 >> Hi developers, happy new year!
 >>
 >> i talked with Armin Waibel about the AutoBuildDb tool, and he
 >> suggested to post here my proposals. I have some "spare time" and i
 >> would like to help make a better tool if possible.
 >>
 >> For what i know, we use two different libraries for access the db,
 >> CrossDB and Torque. The first (and biggest) problem with CrossDB is
 >> it support more or less half of the platforms listed in the
 >> repository.dtd. To fix this problem i think we have two options:
 >> replace CrossDB with Torque *or* add support for the other
 >> databases (DB2,Postgres,etc). I'm not so expert of Torque, but my
 >> opinion is use it it's the best thing.
 >
 >
 > +1 if you think torque is the better way, do it.
 >
 >
 >> The other proposal is about add more options to the AutoBuildDb
 >> tool, like generate sql script and/or create the database, create
 >> an ANT task for it, and a "refresh schema" option for handle the
 >> class changes.
 >
 >
 > +1
 >
 > regards, Armin
 >
 >
 >> Regards, Davide
 >>
 >>
 >> __________________________________________________ Do you Yahoo!?
 >> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 >> http://mailplus.yahoo.com
 >>
 >> -- To unsubscribe, e-mail:
 >
 > <mailto:ojb-dev-unsubscribe@jakarta.apache.org>
 >
 >> For additional commands, e-mail:
 >
 > <mailto:ojb-dev-help@jakarta.apache.org>
 >
 >>
 >>
 >
 >
 > -- To unsubscribe, e-mail:
 > <mailto:ojb-dev-unsubscribe@jakarta.apache.org> For additional
 > commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>
 >
 >
 > -- To unsubscribe, e-mail:
 > <mailto:ojb-dev-unsubscribe@jakarta.apache.org> For additional
 > commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>
 >
 >
 >
 >



Mime
View raw message