openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1599) Cache mode properties passes in to em.find and lock methods are not transient
Date Thu, 25 Mar 2010 03:13:36 GMT
Cache mode properties passes in to em.find and lock methods are not transient
-----------------------------------------------------------------------------

                 Key: OPENJPA-1599
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1599
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 2.0.0-beta2, 2.0.0-beta3, 2.0.0
            Reporter: Albert Lee
            Assignee: Albert Lee
             Fix For: 2.0.0


Cache mode properties passes in to em.find and lock methods are not transient and permanently
set to the entity manager, which caused subsequent em operations to use the undesired
cache mode.

    public <T> T find(Class<T> cls, Object oid, LockModeType mode, Map<String,
Object> properties) {
        assertNotCloseInvoked();
        configureCurrentCacheModes(getFetchPlan(), properties);  <<---- pushFetchPlan
call should be performed first before the getFetchPlan
        configureCurrentFetchPlan(pushFetchPlan(), properties, mode, true);
        try {
            oid = _broker.newObjectId(cls, oid);
            return (T) _broker.find(oid, true, this);
        } finally {
            popFetchPlan();
        }
    }


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


Mime
View raw message