db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thavutam, Prashanth" <1thav...@toysrus.com>
Subject RE: Schema name in DB2
Date Fri, 21 Nov 2003 22:33:58 GMT
I finally got the schema name prefix working with small changes in
BasePeer.java and Criteria.java
But, I think we want to create a user JSSU and use it rather than using the
changed code, to be able to easily upgrade the version.

Thanks for your response.
Prashanth


-----Original Message-----
From: Giulio Vezzelli [mailto:giulio.vezzelli@infolog.it]
Sent: Friday, November 21, 2003 5:16 PM
To: Apache Torque Users List
Subject: R: Schema name in DB2


I had schema problems too, with DB2 and Torque.

I used this dirty workaround : DB2 tries to use the database user name you
supplied as the schema name, if not specified.

So, if you create and use a "JSSU" user for connecting to DB2, you'll handle
it. I know it's not the "good" solution, but it kinda works.

Giulio Vezzelli
Infolog S.r.l.
Via Alfieri, 28
Modena - 41100
Telefono : +39-059-822446
Sito web : http://www.infolog.it
E-mail : giulio.vezzelli@infolog.it
 


> -----Messaggio originale-----
> Da: Thavutam, Prashanth [mailto:1thavutp@toysrus.com] 
> Inviato: venerdì 21 novembre 2003 19.44
> A: 'torque-user@db.apache.org'
> Oggetto: RE: Schema name in DB2
> 
> 
> Please see the below issue and any response is appreciated.
> 
> Thanks,
> Prashanth
> 
> -----Original Message-----
> From: Stuart Belden [mailto:SBelden@bjc.org]
> Sent: Friday, November 21, 2003 1:32 PM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Schema name in DB2
> 
> 
> You may want to post to the Torque mailing list if you 
> haven't already, as this is a problem with Torque (I 
> believe).  They may be able to provide a better answer, faster.
> 
> >>> 1thavutp@toysrus.com 11/21/03 10:13AM >>>
> I debugged through the code and found that the table name in 
> the sql is malformed by BasePeer:
> 
> sql= "SELECT JSSU.USER.USER_ID, JSSU.USER.LOGIN_NAME, 
> JSSU.USER.PASSWORD_VALUE, 
> JSSU.USER.FIRST_NAME, JSSU.USER.LAST_NAME, JSSU.USER.EMAIL, 
> JSSU.USER.CONFIRM_VALUE, 
> JSSU.USER.MODIFIED, JSSU.USER.CREATED, JSSU.USER.LAST_LOGIN, 
> JSSU.USER.DISABLED, 
> JSSU.USER.OBJECTDATA, JSSU.USER.PASSWORD_CHANGED FROM JSSU 
> WHERE JSSU.USER.LOGIN_NAME='anon'"
> 
> JSSU is the schema name that I am prefixing to the table 
> name. DatabaseMap correctly built the table name as 
> JSSU.USER, but in the BasePeer class, it is taking only JSSU. 
> I need to get this done ASAP, please let me know how do I use 
> a schema name to qualify the table name.
> 
> Thanks,
> Prashanth
> 
> 
> -----Original Message-----
> From: Thavutam, Prashanth 
> Sent: Thursday, November 20, 2003 3:23 PM
> To: 'Jetspeed Users List'
> Subject: Schema name in DB2
> 
> 
> Hi,
> 
> I need to use schema name to qualify the table names in DB2, 
> so I created an entry in the properties file, getting it in 
> the *Peer classes and prefixing it to the table names. I left 
> the database name to default. When I run the application, 
> BasePeer.doSelect(criteria) throws SQLException with 
> "<username>.<schemaname> is undefined name. 
> Is this the right way of using schema-name prefix?.
> 
> Database name, user name and schema name are different in my 
> environment.
> 
> Thanks,
> Prashanth
> 
> ==============================================================
> ========== 
> This email message is for the sole use of the intended 
> recipient (s) and may contain confidential and privileged 
> information. Any unauthorized review, use, disclosure or 
> distribution is prohibited. If you are not the intended 
> recipient, please contact the sender by reply email and 
> destroy all copies of the original message. To reply to our 
> email administrator directly, send an email to 
> EmailAdmin@toysrus.com. 
> Toys "R" Us, Inc.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: 
> jetspeed-user-help@jakarta.apache.org 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.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