SQL formatted incorrectly in regards to quoting for Oracle9i
------------------------------------------------------------

                 Key: OJB-130
                 URL: https://issues.apache.org/jira/browse/OJB-130
             Project: OJB
          Issue Type: Bug
          Components: RDBMS platform-specific support
    Affects Versions: 1.0.5
         Environment: OJB 1.0.X_RELEASE,  Oracle 10g
            Reporter: Donald Lyon
             Fix For: 1.0.5


The default beahvior for quoted values for attributes uses double quotes.  This 
is causing incorrect SQL to be generated for Oracle, which expects single 
quotes.  For example, we ran into this issue having an order by criteria:

query.addOrderByAscending("dateField","to_char(dateField,'ddd'");

The method, PlatformDefaultImpl.getQuotedName() replaces the single quotes with 
double quotes.

I believe the solution to this is to override the method in 
PlatformOracle9iImpl to use single quotes:
    /**
     * @return a quoted name. ie "name" or [name]
     */
    protected String getQuotedName(String aString)
    {
        return '"' + aString + '"';
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to