Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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.
-
Hide
- tmp20-bug-report-08022012.zip
- 08/Feb/12 4:54 AM
- 30 kB
- Peter Ledbrook
-
- grails-app/.../ApplicationResources.groovy 0.1 kB
- grails-app/conf/BootStrap.groovy 1 kB
- grails-app/conf/BuildConfig.groovy 2 kB
- grails-app/conf/Config.groovy 4 kB
- grails-app/conf/DataSource.groovy 1 kB
- grails-app/conf/UrlMappings.groovy 0.2 kB
- grails-app/conf/spring/resources.groovy 0.0 kB
- grails-app/.../AuthorController.groovy 0.1 kB
- grails-app/.../BookController.groovy 0.2 kB
- grails-app/domain/.../.Book.groovy.swp 12 kB
- grails-app/domain/.../example/Author.groovy 0.1 kB
- grails-app/domain/.../example/Book.groovy 0.5 kB
- grails-app/i18n/messages.properties 3 kB
- grails-app/.../messages_cs_CZ.properties 3 kB
- grails-app/i18n/messages_da.properties 3 kB
- grails-app/i18n/messages_de.properties 4 kB
- grails-app/i18n/messages_es.properties 3 kB
- grails-app/i18n/messages_fr.properties 2 kB
- grails-app/i18n/messages_it.properties 2 kB
- grails-app/i18n/messages_ja.properties 4 kB
- grails-app/i18n/messages_nl.properties 3 kB
- grails-app/.../messages_pt_BR.properties 3 kB
- grails-app/.../messages_pt_PT.properties 3 kB
- grails-app/i18n/messages_ru.properties 4 kB
- grails-app/i18n/messages_sv.properties 3 kB
- grails-app/i18n/messages_th.properties 6 kB
- grails-app/.../messages_zh_CN.properties 2 kB
- grails-app/views/error.gsp 0.2 kB
- grails-app/views/index.gsp 2 kB
- grails-app/views/layouts/main.gsp 2 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
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.