Local cache doesn't work with paginated queries and DataContext
---------------------------------------------------------------

         Key: CAY-644
         URL: http://issues.apache.org/cayenne/browse/CAY-644
     Project: Cayenne
        Type: Improvement

  Components: Cayenne Core Library  
    Versions: 1.2 [STABLE], 3.0, 2.0 [STABLE]    
    Reporter: Andrus Adamchik
     Fix For: 3.0


Per CAY-570, paginated queries and caching should work on remote clients 
(although see CAY-643), however doing it in the DataContext results in cache 
settings being ignored (for the same reason as CAY-570) -

>From DataContextTst - the last assertion fails:

    public void testPerformPaginatedQueryLocalCache() throws Exception {
        SelectQuery query = new SelectQuery("Artist");
        query.setPageSize(5);
        query.setCachePolicy(QueryMetadata.LOCAL_CACHE);
        
        List objects = context.performQuery(query);
        assertNotNull(objects);
        assertTrue(objects instanceof IncrementalFaultList);

        assertTrue(((IncrementalFaultList) objects).elements.get(0) instanceof 
Artist);
        assertTrue(((IncrementalFaultList) objects).elements.get(7) instanceof 
Map);
        assertTrue(objects.get(7) instanceof Artist);
        
        // do it from cache
        List objects1 = context.performQuery(query);
        assertNotNull(objects1);
        assertSame(objects, objects1);
    }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to