You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by "Donald Lyon (JIRA)" <ji...@apache.org> on 2007/02/08 22:52:06 UTC
[jira] Created: (OJB-130) SQL formatted incorrectly in regards to
quoting for Oracle9i
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: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org