[
https://issues.apache.org/jira/browse/OPENJPA-976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695833#action_12695833
]
Milosz Tylenda commented on OPENJPA-976:
----------------------------------------
B.J. thanks for the researching. However, I have a couple of thoughts:
1. The idea of getting the escape character from JDBC looks nice but in
practice, as you investigated, it is no longer so attractive. We have to add
"heurustic" code to deal with what is returned from the driver and in effect we
gain very little. I suspect the original coders did not use the escape
character from driver for the same or similar reason. On the other hand,
getting the escape character from driver introduces some risk. What if some
driver, we did not test, returms an insane value? What if another driver
returns an already escaped sequence? I am currently not convinced about this
change. Maybe other committers have an opinion?
2. If we decide to use escape char from driver, we should determine whether
users have access to DelegatingDatabaseMetaData. If they do, they might be a
bit surprised by this overridden method. I would rather move the "heuristic"
code to DBDictionary.
3. For what database/driver is meant the following snippet from the patch?
+ else if (searchStringEscape.equals("//"))
+ searchStringEscape = "/";
> Research the need for escape charaters for LIKE in various DB's
> ---------------------------------------------------------------
>
> Key: OPENJPA-976
> URL: https://issues.apache.org/jira/browse/OPENJPA-976
> Project: OpenJPA
> Issue Type: Improvement
> Components: jdbc
> Affects Versions: 2.0.0
> Reporter: B.J. Reed
> Assignee: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-976.patch
>
>
> A new requiresSearchStringEscapeForLike field was added to the DBDictionary
> in http://issues.apache.org/jira/browse/OPENJPA-975. Currently, the default
> is true and the OracleDictionary overwrites it to false. Need to investigate
> other DB's to see what other dictionaries would be better off as false..
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.