Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-440

Enable first-class support of Enum types in the Query Parameters view

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Duplicate
    • Major
    • None
    • 2.0.0.Beta2
    • hibernate
    • None

    Description

      Granted, Enums are persisted as either ints or strings, but that doesn't mean that the Query Parameters view can't support Enums as a first-class construct in the Type column. I suppose there are a few different ways to support this, but let me explain the semantics that I think would make the most sense for supreme usability:

      Select "enum" for the "Type" column
      Then you specify the class in the "Value" column (identical to how it works when "class" is selected for the "Type" column)

      Then, the tools should be able to be clever enough to read the mapping strategy for this enum based on the context of where it is being used in the corresponding hql/jpql statement. The tools would then map the Enum class to it's appropriate int or string representation during query translation / execution. This allows the query writer to be more effective because he/she wouldn't have to know the actual enum mapping strategy to be able to mock up and test the query.

      Attachments

        Issue Links

          Activity

            People

              manderse@redhat.com Max Andersen
              joe.marques Joseph Marques (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: