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

Modeler: Unable to set enum:value as Entity qualifier

    Details

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

      Description

      Modeler fail to parse Entity qualifier like this:
      enumAttribute = enum:org.apache.cayenne.testdo.enum_test.Enum1.two

      The reason is that parser throws ClassNotFoundException because Enum class is unknown to the Modeler.
      This can be fixed by some sort of lazy resolving of enum value.

      P.S. For the history: this bug surfaced from other end, e.g. in runtime. New code generated by cgen in 4.1.M1 throws ClassCastException when trying to provide field of Enum type with initial value base on qualifier expression where String scalar is used.

        Attachments

          Issue Links

            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: