Grails
  1. Grails
  2. GRAILS-8618

Default Sorting a bidirectional one-to-many association fails

    Details

      Description

      I was trying to default sort a bidirectional one-to-many association but it keeps on failing
      with error: java.sql.SQLSyntaxErrorException: ORA-00904: "QUESTIONCA3_"."DISPLAY_ORDER": invalid identifier,

      I checked the db and DISPLAY_ORDER is there

      My Domain classes are as follows

      Class Section{
      Integer displayOrder

      static hasMany=[questionCategories:QuestionCategory]
      static mapping=

      {questionCategories sort:'displayOrder'}

      }

      Class QuestionCategory{
      Integer displayOrder
      static hasMany=[questions:Question]

      static mapping=

      {questions sort:'displayOrder'}

      }

      Class Question

      { Integer displayOrder }

      I can work this around using SortedSet approach, but unfortunately i cannot use it

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Vijay Kumar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development