If you want to access two tables in different schemas, just create two
schema xml files, assuming table name are different. So for schema A
table foo, you have:
testA-schema.xml: <database name="A".../>
<table name="foo">
.....
for schema B table bar, you have
testB-schema.xml: <database name="B" .../>
<table name="bar">
.....
At runtime config, you point both database (schema) to the same
url/username/password. In your code, you will use Foo and Bar objects.
databaseSchema is only used when generating xml file from Oracle
database. Database name is roughly equivalent to Oracle's schema
concept. Torque will automatically put schema name (database name)
before the table name when doing a query.
If table name are the same in two schemas, I think you can use javaName
attributes for table element so the Java class for two tables will be
different. I never tried that though.
Howard Lin
> -----Original Message-----
> From: Juan Perez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 8:49 AM
> To: Turbine Torque Users List
> Subject: RE: Using Tablespace with Torque
>
>
> Hello Roger,
> Thanks for the databaseSchema parameter suggestion, but I still cannot
> access the table.
> Even if it did work this way, it still does not solve the
> problem of trying
> to access two tables in different tablespaces (schemas)
> within the same DB
> connection.
>
> ...Juan...
>
> -----Original Message-----
> From: Barnes Roger [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 12:59 PM
> To: 'Turbine Torque Users List'
> Subject: RE: Using Tablespace with Torque
>
>
> Try putting "databaseSchema = TS" in your build.properties
> file. You would
> not prefix the table names in your schema file. Although I
> haven't tried
> this for Oracle, I was able to get this to work for DB2.
>
> Thanks,
> Roger
>
> -----Original Message-----
> From: Juan Perez [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 10:24 AM
> To: Turbine Torque Users List
> Subject: Using Tablespace with Torque
>
>
> Hello,
> I am learning to use Torque using TDK 2.1. I am trying to
> access a table
> with its tablespace (e.g. "tablespace.tablename") from Oracle
> 8i, how can
> this be done. I have already tried the following to no avail:
>
> In the test-schema.xml file, we tried
> <table name="TS.STATES" idMethod="none" javaName="STATES">
> <column name="STATEID" required="true" size="10"
> type="INTEGER" />
> .
> .
> </table>
>
> Any thoughts would really be appreciated. Thank you for your time. :)
>
> Sincerely,
> Juan
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>