Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.2 final
-
Component/s: Persistence
-
Labels:None
Description
The following named query results in SQL with no WHERE clause:
grails-app/domain/MyDomain.groovy
class MyDomain implements Serializable {
String userId
String reportsTo
String positionNum
static mapping = {
table 'some_legacy_table'
version false
cache usage: 'read-only'
userId column: 'USER_OPRID'
reportsTo column: 'REPORTS_TO'
positionNum column: 'POSITION_NBR'
id composite:['userId', 'reportsTo', 'positionNum']
}
static namedQueries = {
userAccessList { user, manager, position ->
and {
eq( 'userId', user )
or {
eq 'reportsTo', manager
eq 'positionNum', position
}
}
}
}
}
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Fixed: http://github.com/grails/grails/commit/3e02493cef64207f27dbcb85536e83a7f457c671