db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malte Stien <ma...@stien.de>
Subject Re: Map objects to different databases
Date Fri, 25 Apr 2003 06:52:10 GMT
Hi,

Thank you for that. I will try this. In which file do I have to set the 
following lines? Is that for the runtime in Torque.properties or for the code 
generation in build.properties?

> torque.schema.sql.excludes  = <the database you will build manually>
> torque.schema.create-db.excludes = id-table-schema.xml, <the database
> you will build manually>
> torque.schema.init-sql.excludes = <the database you will build manually>

Some questions remain:
1. How do I deal with the two different databases during runtime?
2. How do I initilize Torque to make it use both databases?
3. And how do I specify which classes map to which database if I generate one 
database manually?

Thank you very much for further advice.
Malte.

On Friday 25 April 2003 16:30, Frederic Gedin wrote:
> Hi Malte
>
> Malte Stien wrote:
> >>Reading your Torque.properties extract, I do not see the cause of your
> >>problem: it looks like mine except that I use MySQL instead of postgres.
> >
> >Do you use two databases during runtime as well?
>
> Yes I do. But I ask Torque to generate only one, the other coming from
> an other application.
>
> >>  - are you sure you do not have java class names which conflict between
> >>the project and the master databases?
> >>  - are you sure that no error or exception message has been generated
> >>at build time?
> >
> >I do not have any compilation errors. My problem is not, that I cannot
> > compile the code or that Torque does not generate the Java code
> > correctly. The problem is just, that Torque does not generate
> > initialization code (i.e. the sql script) to setup two databases. So, it
> > will not use two databases during runtime as well. I just want to
> > convince Torque, that some of the tables are in the project database and
> > others are in the project master database. Torque has to consider that
> > for the database generation as well as for the database runtime usage.
> > But at the moment the first step already fails.
>
> Now I understand your problem.  I have to tell that I faced the same
> problem: Torques refuses to build two separate databases.  I did not
> investigate further because, I my case, I just really need to build one.
>
> I am sorry not being able to really help you on this.  The only advice I
> could give is to give up trying to build your two databases using Torque
> for now and continue your application development: regarding the om
> generation and the runtime, it should work fine.
> To do this you will need to update the following Torque configuration
> parameters:
> torque.schema.sql.excludes  = <the database you will build manually>
> torque.schema.create-db.excludes = id-table-schema.xml, <the database
> you will build manually>
> torque.schema.init-sql.excludes = <the database you will build manually>
>
> Another idea I just have (but I did not test it): go to your
> build-torque.xml file, and update the sql target to require for building
> the second database
> <antcall target="sql-classpath-dbmaster"/>
> <antcall target="sql-classpath-dbproj"/>
> ......
>
> And of course build the target sql-classpath-dbmaster and
> sql-classpath-dbproj according to the model sql-classpath
>
>
> Regards
>
> Frederic
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message