Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1958

SelectById - a new full-featured select query to get objects by id

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.M2
    • None
    • None

    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 = SelectById.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.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: