Cayenne
  1. Cayenne
  2. CAY-12

Prefetching on entity used in qualifier

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 [LEGACY], 1.1 [LEGACY]
    • Fix Version/s: 1.1 [LEGACY]
    • Component/s: Core Library
    • Labels:
      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

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development