Skip to content

Instantly share code, notes, and snippets.

@olivermt
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olivermt/7e837d889ecfd4500ad9 to your computer and use it in GitHub Desktop.
Save olivermt/7e837d889ecfd4500ad9 to your computer and use it in GitHub Desktop.
@Secured('IS_AUTHENTICATED_ANONYMOUSLY')
def test() {
respond UserRole.withCriteria {
role {
eq('authority', 'ROLE_COMPANY_ADMIN')
}
}
}
Message: ERROR: missing FROM-clause entry for table "role_alias1_"
Position: 97
Ultimate goal:
def c = createCriteria()
return c.list {
role {
eq('authority', 'ROLE_COMPANY_ADMIN')
}
user {
eq('company', company)
}
projections {
property ('user')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment