[ 
https://issues.apache.org/jira/browse/OPENJPA-975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681371#action_12681371
 ] 

Michael Dick commented on OPENJPA-975:
--------------------------------------

Is this change specific to Oracle, or do other databases also allow the \ 
character to be used? 

I was thinking of this as more of a compatibility option. Ie in openjpa < 1.3.0 
we automatically append the ESCAPE clause (unless configured otherwise). In 
OpenJPA >= 1.3.0 we do not (since the clause seems extraneous to me). 

I think this would be more tolerable for JDO providers who build on top of 
OpenJPA's kernel. They could set the compatibility option in their 
ProductDerivation (similar to what was proposed for detach options) and then 
all databases would use the old behavior. If the setting is in the DBDictionary 
then reverting to the old behavior requires more code. 

To answer the broader question about whether we care for JDO in OpenJPA version 
x. My opinion is that we care, but our obligation is to provide JPA expected 
behavior by default. When this conflicts with JDO's expected behavior we should 
provide a configuration option to allow JDO like behavior, but we have no 
obligation to provide it "out of the box". 

> Oracle needs ability to not have an escape character for search strings.
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-975
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-975
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.3.0, 2.0.0
>         Environment: Oracle
>            Reporter: B.J. Reed
>            Assignee: B.J. Reed
>            Priority: Minor
>             Fix For: 1.2.0, 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-975b.patch, OPENJPA-975doc.patch
>
>
> Oracle application has a JPQL query that attempts to set a parameter to '\'. 
> '\' is not a reserved character with Oracle and the query will work if you 
> execute it "normally" with JDBC.
> OpenJPA automatically adds ESCAPE ('\') to every search SQL query.  As a 
> result the \ is interpreted as an escape indicator and the SQL will not 
> execute as expected.

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

Reply via email to