Hi, I dont know much about the DBAdapter class, but can't you let the DBAdapter tell you whether SCHEMA.TABLE is allowed by the DB? That sounds like a nice generic way of doing it.
-Sarav. -----Original Message----- From: Steve Toth <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Fri, 27 Aug 2004 11:56:54 -0700 Subject: Fwd: Putting schema into the select clause ---------- Forwarded message ---------- From: Steve Toth <[EMAIL PROTECTED]> Date: Fri, 27 Aug 2004 11:55:56 -0700 Subject: Re: Putting schema into the select clause To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Since I really really like the whole process and idea of Torque I want to extend this. I've already started to modify the generator and have added a schema="blah" attribute to the table element since it makes sence to me that tables should have schema information embedded rather then at the database level. Since that way you can have a database of multiple schemas all grouped together and do cross schema joins. Ok, the big problem seems to me that depending on where in the schema clause you need to use slightly different names for the table. Sometimes you want to use SCHEMA.TABLENAME and sometimes just TABLENAME. Or do all DBs let you do stuff like SELECT SCHEMA.TABLENAME.COLUMN FROM SCHEMA.TABLENAME WHERE SCHEMA.TABLENAME.COLUMNB > 5 ?? If this is the case then all that really needs to be done is change the TABLE_NAME variable to be SCHEMA.TABLENAME rather then what it is now which is just TABLENAME At which point adding a schema seems almost esoteric, but I think that it should be added for the sake of completeness and correctness. As Schema does play a role in the resulting SQL statments that should be generated. Cause the api seems to use Strings all over the place as keys, especially when doing lookups of table related data, it simple uses the TABLE_NAME as a key to get column information. So adding schema information would mean changing all the critera object as well. I believe. Any ideas, thoughts, comments? To developers of torque, whats the easiest way to start submitting patches? On Fri, 27 Aug 2004 10:03:42 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am in complete agreement and I have no explanation as to why it is > omitted. Our workaround in both Oracle and DB2 (mainframe) is to use > synonyms. Our security model requires the application log in as a third > party so the use of private synonyms was necessary. > > hth, mark > > > > -----Original Message----- > From: Steve Toth [mailto:[EMAIL PROTECTED] > Sent: Friday, August 27, 2004 10:58 AM > To: Gold, Mark A. > Subject: Re: Putting schema into the select clause > > Well that is too bad that it doesn't support it yet because it seems > like this should be a standard feature as without schema information it > seems like this information it will be useless to me as our (albeit > insane) database design requires the useage of fully qualified schemas > to work properly. > > How would I go about implementing this in Torque if I wanted to add it? > Do it and then make a patch or something. This seems like a very > fundamental change, effecting many low level Torque classes. Anyone > else think that this feature needs to be added? > > Thanks, > Steve Toth > > On Fri, 27 Aug 2004 08:01:10 -0500, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Steve, This is an ongoing issue with Torque and one I have not seen a > > solution for. Although some solutions have been offered on this list > > there currently seems to be no practical way to fully qualify object > > names. > > > > > > > > -----Original Message----- > > From: Steve Toth [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 7:39 PM > > To: [EMAIL PROTECTED] > > Subject: Putting schema into the select clause > > > > I'm trying to use Torque with Oracle and I'm not sure how to get > > torque to put the schema before all table names during select > > operations... > > > > Right now the SQL is coming out like this.. > > > > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 FROM TABLE > > > > I want it to look like this > > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 FROM SCHEMA.TABLE > > > > or > > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 ,TABLE2.COL1 FROM > > SCHEMA.TABLE, SCHEMA2.TABLE2 > > > > What do I need to do in my schema.xml file, or generation ? > > > > Thanks! > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > This message is for the designated recipient only and may contain > > privileged, proprietary, or otherwise private information. If you > > have received it in error, please notify the sender immediately and > > delete the original. Any other use of the email by you is prohibited. > > > > This message is for the designated recipient only and may contain privileged, > proprietary, or otherwise private information. If you have received it in error, > please notify the sender immediately and delete the original. Any other use of the > email by you is prohibited. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]