[ 
https://issues.apache.org/cayenne/browse/CAY-965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682#action_12682
 ] 

Øyvind Harboe commented on CAY-965:
-----------------------------------

(accidentally sent off the previous comment...)

The problem is ObjectIdQuery does not cache the result of the query when there 
are no matches, so a query is sent to the database again and again to find out 
that there is no matching record...

in snapshots LRUMap there the ObjectId should have an entry that points to Java 
null, which is different from no map existing for the ObjectId key.

DataRowStore.getCachedSnapshot(ObjectId) line: 351      
DataDomainQueryAction.interceptOIDQuery() line: 174     
DataDomainQueryAction.execute() line: 114       
DataDomain.onQuery(ObjectContext, Query) line: 740      


> Objects that do NOT exist must be cached
> ----------------------------------------
>
>                 Key: CAY-965
>                 URL: https://issues.apache.org/cayenne/browse/CAY-965
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>         Environment: any
>            Reporter: Øyvind Harboe
>            Assignee: Andrus Adamchik
>
> We're seing that thousands of queries that return 0 rows:

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

Reply via email to