You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Pedro Aquilino Sánchez (JIRA)" <ji...@apache.org> on 2011/07/02 18:48:21 UTC
[jira] [Created] (CAY-1585) SelectQuery automatic cache key needs
FetchOffset
SelectQuery automatic cache key needs FetchOffset
-------------------------------------------------
Key: CAY-1585
URL: https://issues.apache.org/jira/browse/CAY-1585
Project: Cayenne
Issue Type: Bug
Components: Core Library
Affects Versions: 3.1M2
Reporter: Pedro Aquilino Sánchez
Priority: Minor
Fix For: 3.1 (final)
SelectQueryMetadata.resolve:
Must include the fetchOffset property from query.
So we can cache correctly pagination queries.
for example without this property:
SelectQuery query = new SelectQuery(Example.class);
query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
query.setFetchOffset(0);
query.setFetchLimit(10);
ctx.performQuery(query);
// Returns the first ten elements, cached under key "Example/10"
Select query2 = new SelectQuery(Example.class);
query2.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
query2.setFetchOffset(10);
query2.setFetchLimit(10);
ctx.performQuery(query2);
// Returns the first ten elements from cache, this is not correct it must return the next block of elements.
// Because the cache key is again "Example/10"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAY-1585) SelectQuery automatic cache key needs
FetchOffset
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk updated CAY-1585:
-------------------------------------
Fix Version/s: 3.0.3
> SelectQuery automatic cache key needs FetchOffset
> -------------------------------------------------
>
> Key: CAY-1585
> URL: https://issues.apache.org/jira/browse/CAY-1585
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.1M2
> Reporter: Pedro Aquilino Sánchez
> Assignee: Dzmitry Kazimirchyk
> Priority: Minor
> Fix For: 3.0.3, 3.1M3
>
>
> SelectQueryMetadata.resolve:
> Must include the fetchOffset property from query.
> So we can cache correctly pagination queries.
> for example without this property:
> SelectQuery query = new SelectQuery(Example.class);
> query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query.setFetchOffset(0);
> query.setFetchLimit(10);
> ctx.performQuery(query);
> // Returns the first ten elements, cached under key "Example/10"
> Select query2 = new SelectQuery(Example.class);
> query2.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query2.setFetchOffset(10);
> query2.setFetchLimit(10);
> ctx.performQuery(query2);
> // Returns the first ten elements from cache, this is not correct it must return the next block of elements.
> // Because the cache key is again "Example/10"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAY-1585) SelectQuery automatic cache key needs
FetchOffset
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk reassigned CAY-1585:
----------------------------------------
Assignee: Dzmitry Kazimirchyk
> SelectQuery automatic cache key needs FetchOffset
> -------------------------------------------------
>
> Key: CAY-1585
> URL: https://issues.apache.org/jira/browse/CAY-1585
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.1M2
> Reporter: Pedro Aquilino Sánchez
> Assignee: Dzmitry Kazimirchyk
> Priority: Minor
> Fix For: 3.1 (final)
>
>
> SelectQueryMetadata.resolve:
> Must include the fetchOffset property from query.
> So we can cache correctly pagination queries.
> for example without this property:
> SelectQuery query = new SelectQuery(Example.class);
> query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query.setFetchOffset(0);
> query.setFetchLimit(10);
> ctx.performQuery(query);
> // Returns the first ten elements, cached under key "Example/10"
> Select query2 = new SelectQuery(Example.class);
> query2.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query2.setFetchOffset(10);
> query2.setFetchLimit(10);
> ctx.performQuery(query2);
> // Returns the first ten elements from cache, this is not correct it must return the next block of elements.
> // Because the cache key is again "Example/10"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CAY-1585) SelectQuery automatic cache key needs
FetchOffset
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk closed CAY-1585.
------------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.1 (final))
3.1M3
Added fetch offset to SelectQuery cache key. Also added fetch offset and limit to cache keys of the rest queries supporting them.
Thanks for the report.
> SelectQuery automatic cache key needs FetchOffset
> -------------------------------------------------
>
> Key: CAY-1585
> URL: https://issues.apache.org/jira/browse/CAY-1585
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.1M2
> Reporter: Pedro Aquilino Sánchez
> Assignee: Dzmitry Kazimirchyk
> Priority: Minor
> Fix For: 3.1M3
>
>
> SelectQueryMetadata.resolve:
> Must include the fetchOffset property from query.
> So we can cache correctly pagination queries.
> for example without this property:
> SelectQuery query = new SelectQuery(Example.class);
> query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query.setFetchOffset(0);
> query.setFetchLimit(10);
> ctx.performQuery(query);
> // Returns the first ten elements, cached under key "Example/10"
> Select query2 = new SelectQuery(Example.class);
> query2.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
> query2.setFetchOffset(10);
> query2.setFetchLimit(10);
> ctx.performQuery(query2);
> // Returns the first ten elements from cache, this is not correct it must return the next block of elements.
> // Because the cache key is again "Example/10"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira