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

Broken prefetch of entity with inheritance and attribute with custom java type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.B2, 4.1.M1
    • Fix Version/s: 4.0.RC1, 4.1.M2
    • Component/s: Core Library
    • Labels:
      None

      Description

      This is a rare combination of query parameters, but it is perfectly valid.

      • Prerequisites:
        • ObjEntity A with some set of attributes
        • ObjEntity B inherited from A with one additional attribute with Enum type (it can be any type that isn't matched directly with underlying DB type)
        • ObjEntity C that have a relationship with A
      • Query:
        • Select C with prefetch of A
      • Outcome:
        • IllegalArgumentException when converting result set into objects

      It seems like java type of this additional attribute is not taken into account and defined by DbAttribute type only.

      P.S. This one was found in cayenne-client stack in 4.0.B2 version, it is hard to find directly as underlying data storage hides conversion error until attribute is fetched directly.

        Attachments

          Activity

            People

            • Assignee:
              ntimofeev Nikita Timofeev
              Reporter:
              ntimofeev Nikita Timofeev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: