db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Vatkov" <bvat...@globaltech-bg.com>
Subject Re: torque-gen multiple db ?
Date Fri, 19 Mar 2004 09:33:14 GMT
I havent try <external-schema
and I hope it will do the work.
Since i am not using IdBroker i think it will not be a problem,
..and I recommend you to use native id generation.

regards,
bogdan
----- Original Message -----
From: "Alexandru Dovlecel" <alexandru.dovlecel@siemens.com>
To: "'Apache Torque Users List'" <torque-user@db.apache.org>
Sent: Friday, March 19, 2004 10:58 AM
Subject: RE: torque-gen multiple db ?


> Hi,
>
> I have just started using torque. An expert should confirm if this is a
good
> approach or not: for each module create a <modulename>-schema.xml. If one
> table of module A has relations with a table from module B, then in
> A-schema.xml add the following tag:
> <external-schema filename="B-schema.xml" />
>
> By doing this you can also customize the package in which you are going to
> generate the files for the specified module.
>
> Dunno if crossreferences (A ref to B and B ref to A) works.
>
> If using the IdBroker, this solution does not work properly (I think)
> because it generates several ids for the same table. So you are going to
> have for table Table1 (module B) two entries: Table1 with key 100 and
Table1
> with key 1100 (the last one was added when building the id-sql for the A
> module that refs the B module). I NEED CONFIRMATION IF THIS IS A BUG OF
> TORQUE OR NOT, PLS.
>
> Hope it somehow helps you.
> Alex
>
> > -----Original Message-----
> > From: Bogdan Vatkov [mailto:bvatkov@globaltech-bg.com]
> > Sent: Friday, March 19, 2004 10:59 AM
> > To: Apache Torque Users List
> > Subject: Re: torque-gen multiple db ?
> >
> >
> > What I need is to have different schemas of one database. and
> > maybe i was
> > wrong
> > to talk about multiple databases ..actually i need 1 database
> > and multiple
> > schemas
> > in postgresql the schema is something like namespace (i do
> > not mean xml
> > schema or conceptual db schema)
> >
> > So the method of accomplishing the multiple schema i think
> > was to somehow
> > use multiple database definition method
> >
> > I think your way is not suitable for me as long as i need to
> > have relations
> > between some tables located in
> > different schemas.
> >
> > for the moment i have all the tables from all the schemas in one XML
> > definition file.
> >
> > examle:
> > <database id="globalservices" name="globalservices"
> > defaultidMethod="native"
> > defaultJavaType="object"basePeer="org.apache.torque.util.BasePeer"
> > defaultJavaNamingMethod="javaname" heavyIndexing="false">
> >
> >     <table name="sys.account"  idMethod="native" skipSql="false"
> > abstract="false" basePeer="org.apache.torque.util.BasePeer"
> > heavyIndexing="false" description="" x="4774" y="2482" width="106"
> > height="142">
> > ....
> > ....
> > 6 more tables with names "sys.tablename"
> >
> >     <table name="cs.ani_conditions"  idMethod="native" skipSql="false"
> > abstract="false" basePeer="org.apache.torque.util.BasePeer"
> > heavyIndexing="false" description="" x="5125" y="2807" width="100"
> > height="90">
> > ........
> > ........
> > 5 more tables with names "cs.tablename"
> >
> > and 4-5 more namespaces with 5-9 tables in each
> >
> > the code here contains some extra attributes and it is
> > because i have used
> > devaki to visualize my XML db schema.
> >
> > Of course i have made some corrections in the torque runtime &
> > torque-generator to successfully support the . (dot)
> > inside tables names. but now i want to separate the definition of each
> > schema and place it in a separate file (xml file)
> >
> > any other suggestions will be appreciated
> >
> > regards,
> > bogdan
> > ----- Original Message -----
> > From: "Gary Shea" <shea@gtsdesign.com>
> > To: "Apache Torque Users List" <torque-user@db.apache.org>
> > Sent: Thursday, March 18, 2004 7:36 PM
> > Subject: Re: torque-gen multiple db ?
> >
> >
> > > I'm currently using multiple databases.  I build the schema and java
> > > code separately for each database.  In the schema document,
> > make sure
> > > you set a unique name in the <database> element for each of your
> > > databases.
> > >
> > > Does that answer your question?
> > >
> > >         Gary
> > >
> > > On Thu, 18 Mar 2004, at 19:39 [+0200], Bogdan Vatkov
> > (bvatkov@globaltech-bg...:
> > >
> > > > Hey guys ..any clues about multiple databases definition in the
> > torque-generator phase ?
> > > >
> > > > regards,
> > > > bogdan
> > > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: torque-user-help@db.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
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