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

Prefetching on entity used in qualifier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0 [LEGACY], 1.1 [LEGACY]
    • 1.1 [LEGACY]
    • Core Library
    • None

    Description

      DataContextPrefetchTst.testPrefetch9() test case
      demonstrates a condition for failing prefetch query:
      query with that has a prefetch destination entity as a
      part of its qualifier.

      There are 2 sub-cases:

      1. When such prefetch makes little sense (we match on a
      to-one object that is already known)

      2. When such prefetch makes sense, e.g. when the
      qualifier is NOT EQUAL, or when matching on a to-many.

      I guess the right thing would be still to do the
      prefetch, using an inner join back to the original
      entity (thus eliminating prefetched rows that have no
      relationship with root entity).

      Even in case (1) prefetch may have some value -
      refreshing cached object with database data

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: