Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom finder SQL text

2001-07-03 Thread Vinay Menon

Jay,
Obviously, that is why I said that converting the finder query to lower
case is not correct.


Here is the changed code in JDBCFinderCommand.

  if (lcQuery.startsWith(,) || lcQuery.startsWith(inner join)) {
 //this is the case of a 'where' that is build to actually join
tables:
 //  ,table2 as foo where foo.col1 = entitytable.col2 AND
entitytable.filter = {1}
 // or
 //  inner join table2 on table2.col1 = entitytable.col2 AND
entitytable.filter = {1}
 String tableList = null;
 int whereStart = lcQuery.indexOf(where);
 if (whereStart == -1) {
//log this at debug in case someone has made a mistake, but
assume that
// they mean a findAll.
log.debug(Strange query for finder +f.getName()+
   . Includes join, but no 'where' clause. Is this a
findAll?);
tableList = query;
whereClause = ;
 } else {
tableList = query.substring(0, whereStart);
whereClause = query.substring(whereStart);
 }
 fromClause = FROM +jawsEntity.getTableName()+tableList;
  } else {
 fromClause = FROM +jawsEntity.getTableName();
 if (lcQuery.startsWith(where))
whereClause = query;
 else
whereClause = where +query;
  }

Vinay
- Original Message -
From: Jay Walters [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 2:03 PM
Subject: RE: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom
finder SQL text


 They are all case sensitive when it comes to the data...

 -Original Message-
 From: Vinay Menon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 03, 2001 8:59 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom
 finder SQL text


 Dan,
 Oracle case sensitive as well. One of the chaps here put a finder
query
 ... where flg='T'

 Obviously it didn't work cos the JDBCDefinedFinderCommand issued it to
 the backed as where flg=i't'. This is cos the where clause is
constructed
 with the lower case query. Do you want me to fix it?

 Vinay

 - Original Message -
 From: danch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 03, 2001 4:17 AM
 Subject: Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom
 finder SQL text


  Does anybody know what databases are case sensitive WRT column and table
  names (or even keywords). I've never run into case sensitive SQL
  databases before.
 
  [EMAIL PROTECTED] wrote:
 
   Bugs item #438115, was opened at 2001-07-02 19:50
   You can respond by visiting:
  

http://sourceforge.net/tracker/?func=detailatid=376685aid=438115group_id=
 22866
  
   Category: JBossCMP
   Group: v2.4 BETA (stable)
   Status: Open
   Resolution: None
   Priority: 5
   Submitted By: Michael Jara (mjara)
   Assigned to: Nobody/Anonymous (nobody)
   Summary: JAWS lower-cases custom finder SQL text
  
   Initial Comment:
   JAWS is now lower-casing all custom finder SQL text
   specified in jaws.xml.  Most database drivers seem to
   ignore case, but some (such as JConnect5.2/SybaseASE)
   do not.
  
   For example, if I have this in my jaws.xml file:
  
   entity
   ejb-nameEventDescription/ejb-name
   finder
   namefindByEventType/name
   query, TypeDescriptionPair,
   EventType WHERE EventType.description={0} AND
   EventType.enumerationIndex=TypeDescriptionPair.eventTyp
   eKey AND
   TypeDescriptionPair.eventDescriptionKey=EventDescriptio
   n.enumerationIndex/query
  
   orderEventDescription.description/order
   /finder
   /entity
  
   All table and field names are lower-cased on
   execution.  This is the trace logged in Beta 2.4:
  
   2001-07-02 20:39:22,195 [RMI TCP Connection(8)-
   161.218.184.161] DEBUG JAWS - findByEventType command
   executing: SELECT EventDescription.enumerationIndex,
   EventDescription.description FROM EventDescription,
   typedescriptionpair, eventtype  where
   eventtype.description=? and
   eventtype.enumerationindex=typedescriptionpair.eventtyp
   ekey and
   typedescriptionpair.eventdescriptionkey=eventdescriptio
   n.enumerationindex ORDER BY
   EventDescription.description
   2001-07-02 20:39:22,195 [RMI TCP Connection(8)-
   161.218.184.161] DEBUG JAWS - Set parameter: idx=1,
   jdbcType=VARCHAR, value=Construction
   2001-07-02 20:39:22,285 [RMI TCP Connection(8)-
   161.218.184.161] DEBUG JAWS -
   com.sybase.jdbc2.jdbc.SybSQLException: The column
   prefix 'eventdescription' does not match with a table
   name or alias name used in the query. Either the table
   is not specified in the FROM clause or it has a
   correlation name which must be used instead.
  
   This DOES work properly in release 2.2 (maintaining
   case as entered in jaws.xml.)
  
   --
  
   You can respond

Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom finder SQL text

2001-07-03 Thread danch

Vinay Menon wrote:

 Dan,
 Oracle case sensitive as well. One of the chaps here put a finder query
 ... where flg='T'
 
 Obviously it didn't work cos the JDBCDefinedFinderCommand issued it to
 the backed as where flg=i't'. This is cos the where clause is constructed
 with the lower case query. Do you want me to fix it?

D'Oh! That one I expect to not work - SQL is usually case sensitive with 
the _contents_ of columns. Go ahead and fix, if you've the time.

thanks much,
danch



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom finder SQL text

2001-07-03 Thread Georg Rehfeld

Hi danch,

 Does anybody know what databases are case sensitive WRT column and table 
 names (or even keywords). I've never run into case sensitive SQL 
 databases before.

MySQL too is case sensitive on database, table and index names
on a case sensitive file system (i.e. xNIX) with some table types
especially the default MyISAM table type. The reason is, that
they simply use the given name to generate a file path from it.

regards
Georg
 ___   ___
| + | |__Georg Rehfeld  Woltmanstr. 12 20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]   +49 (40) 23 53 27 10



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom finder SQL text

2001-07-03 Thread danch (Dan Christopherson)

Georg Rehfeld wrote:

 Hi danch,
 
 
Does anybody know what databases are case sensitive WRT column and table 
names (or even keywords). I've never run into case sensitive SQL 
databases before.

 
 MySQL too is case sensitive on database, table and index names
 on a case sensitive file system (i.e. xNIX) with some table types
 especially the default MyISAM table type. The reason is, that
 they simply use the given name to generate a file path from it.
 


Gak! Well, Vinay's fixed that bug already.

-danch

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] [ jboss-Bugs-438115 ] JAWS lower-cases custom finder SQL text

2001-07-02 Thread danch

Does anybody know what databases are case sensitive WRT column and table 
names (or even keywords). I've never run into case sensitive SQL 
databases before.

[EMAIL PROTECTED] wrote:

 Bugs item #438115, was opened at 2001-07-02 19:50
 You can respond by visiting: 
 http://sourceforge.net/tracker/?func=detailatid=376685aid=438115group_id=22866
 
 Category: JBossCMP
 Group: v2.4 BETA (stable)
 Status: Open
 Resolution: None
 Priority: 5
 Submitted By: Michael Jara (mjara)
 Assigned to: Nobody/Anonymous (nobody)
 Summary: JAWS lower-cases custom finder SQL text
 
 Initial Comment:
 JAWS is now lower-casing all custom finder SQL text 
 specified in jaws.xml.  Most database drivers seem to 
 ignore case, but some (such as JConnect5.2/SybaseASE) 
 do not.
 
 For example, if I have this in my jaws.xml file:
 
 entity
 ejb-nameEventDescription/ejb-name
 finder
 namefindByEventType/name
 query, TypeDescriptionPair, 
 EventType WHERE EventType.description={0} AND 
 EventType.enumerationIndex=TypeDescriptionPair.eventTyp
 eKey AND 
 TypeDescriptionPair.eventDescriptionKey=EventDescriptio
 n.enumerationIndex/query
 
 orderEventDescription.description/order
 /finder
 /entity
 
 All table and field names are lower-cased on 
 execution.  This is the trace logged in Beta 2.4:
 
 2001-07-02 20:39:22,195 [RMI TCP Connection(8)-
 161.218.184.161] DEBUG JAWS - findByEventType command 
 executing: SELECT EventDescription.enumerationIndex, 
 EventDescription.description FROM EventDescription, 
 typedescriptionpair, eventtype  where 
 eventtype.description=? and 
 eventtype.enumerationindex=typedescriptionpair.eventtyp
 ekey and 
 typedescriptionpair.eventdescriptionkey=eventdescriptio
 n.enumerationindex ORDER BY 
 EventDescription.description
 2001-07-02 20:39:22,195 [RMI TCP Connection(8)-
 161.218.184.161] DEBUG JAWS - Set parameter: idx=1, 
 jdbcType=VARCHAR, value=Construction
 2001-07-02 20:39:22,285 [RMI TCP Connection(8)-
 161.218.184.161] DEBUG JAWS - 
 com.sybase.jdbc2.jdbc.SybSQLException: The column 
 prefix 'eventdescription' does not match with a table 
 name or alias name used in the query. Either the table 
 is not specified in the FROM clause or it has a 
 correlation name which must be used instead.
 
 This DOES work properly in release 2.2 (maintaining 
 case as entered in jaws.xml.)
 
 --
 
 You can respond by visiting: 
 http://sourceforge.net/tracker/?func=detailatid=376685aid=438115group_id=22866
 
 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development