Grails
  1. Grails
  2. GRAILS-8752

Named queries not working with single-ended embedded associations?

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1-RC1
    • Component/s: Persistence
    • Labels:
      None

      Description

      See attached bug report. Simply start up the application and go to http://localhost:8080/tmp20/book/popular. If you go to Book.groovy and replace the existing popularQueryNoSort named query criteria with the commented out line, the query starts working. It seems the

      query {
          association { ... }
      }
      

      syntax doesn't work.

        Activity

        Hide
        Jeff Scott Brown added a comment -

        FYI...

        This may not be peculiar to named queries. This may be a general problem with the criteria builder.

        The code in HibernateCriteriaBuilder.invokeMethod(String, Object) which handles association queries like the one shown above does not work for embedded associations like this one.

        Show
        Jeff Scott Brown added a comment - FYI... This may not be peculiar to named queries. This may be a general problem with the criteria builder. The code in HibernateCriteriaBuilder.invokeMethod(String, Object) which handles association queries like the one shown above does not work for embedded associations like this one.

          People

          • Assignee:
            Jeff Scott Brown
            Reporter:
            Peter Ledbrook
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development