cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-1958) IdSelect - a new full-featured select query to get objects by id
Date Sun, 05 Oct 2014 11:50:33 GMT

     [ https://issues.apache.org/jira/browse/CAY-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrus Adamchik updated CAY-1958:
---------------------------------
    Description: 
This is to fill the gap left between ObjectIdQuery (hard to use, odd caching model, no generics
support, intended for internal use) and Cayenne.objectForPk() (hardcoded caching model , not
a query):


Artist a = IdSelect.query(Artist.class, 3).useLocalCache("artists").selectOne(context);

Note on caching... this hits query cache instead of object cache, so until we merge the two
this may result in extra DB trips for the objects that we already have resolved. I guess that's
the price to pay for consistency.

  was:
This is to fill the gap left between ObjectIdQuery (hard to use, odd caching model, no generics
support, intended for internal use) and Cayenne.objectForPk() (hardcoded caching model , not
a query):


Artist a = IdSelect.query(Artist.class, 3).useLocalCache("artists").selectOne(context);


> IdSelect - a new full-featured select query to get objects by id
> ----------------------------------------------------------------
>
>                 Key: CAY-1958
>                 URL: https://issues.apache.org/jira/browse/CAY-1958
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.2.M2
>
>
> This is to fill the gap left between ObjectIdQuery (hard to use, odd caching model, no
generics support, intended for internal use) and Cayenne.objectForPk() (hardcoded caching
model , not a query):
> Artist a = IdSelect.query(Artist.class, 3).useLocalCache("artists").selectOne(context);
> Note on caching... this hits query cache instead of object cache, so until we merge the
two this may result in extra DB trips for the objects that we already have resolved. I guess
that's the price to pay for consistency.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message