Allows unrecognized hints (those not starting with openjpa.* as prefix) be stored opaquely - for extension plug-ins.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@698714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-09-24 20:21:51 +00:00
parent 1706670152
commit 85b44d83d5
1 changed files with 5 additions and 1 deletions

View File

@ -501,8 +501,12 @@ public class QueryImpl implements OpenJPAQuerySPI, Serializable {
public OpenJPAQuery setHint(String key, Object value) {
_em.assertNotCloseInvoked();
if (key == null || !key.startsWith("openjpa."))
if (key == null)
return this;
if (!key.startsWith("openjpa.")) {
_query.getFetchConfiguration().setHint(key, value);
return this;
}
String k = key.substring("openjpa.".length());
try {