Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPMONGODB-195: Allow for hints with DetachedCriteria #357

Closed
graemerocher opened this issue Apr 15, 2012 · 1 comment
Closed

GPMONGODB-195: Allow for hints with DetachedCriteria #357

graemerocher opened this issue Apr 15, 2012 · 1 comment

Comments

@graemerocher
Copy link
Member

Original Reporter: samd
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPMONGODB-195

Not sure if this might have been encountered already or not but I'm trying to use DetachedCriteria with Mongo in which it doesn't appear hints are recognized. These work with regular criteria

{code}
def detachedCriteria = {
offset theOffset
max theLimit
order sortBy, sortOrder
eq 'user', user
arguments hint: ['dateCreated': 1]
} as DetachedCriteria

No signature of method: grails.gorm.DetachedCriteria.arguments() is applicable for argument types: (java.util.LinkedHashMap) values: [[hint:[dateCreated:1]]]. Stacktrace follows:

groovy.lang.MissingMethodException: No signature of method: grails.gorm.DetachedCriteria.arguments() is applicable for argument types: (java.util.LinkedHashMap) values: [[hint:[dateCreated:1]]]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
{code}

@graemerocher
Copy link
Member Author

graemerocher said:
fixed by e93297f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant