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

IllegalArgumentException thrown by MorphiaPlugin in CRUD where clause #99

Open
CodeTripper opened this issue Sep 15, 2012 · 1 comment

Comments

@CodeTripper
Copy link

When I try to customise CRUD for the List view by passing a where clause like this:
where = "state in (Punjab,Jammu and Kashmir)";
List objects = type.findPage(page, search, searchFields, orderBy, order, where);

I get an IllegalArgumentException like below:
IllegalArgumentException occured : invalid where clause: state in (Rajasthan,Uttar Pradesh,Delhi,Himachal Pradesh,Punjab,Jammu and Kashmir).

This I believe is MorphiaPlugiin is splitting wherever there is an "and" in this line
String[] propValPairs = where.split("(and|&&)");

Any workaround for this? How can I escape the word "and" in my where clause?

@greenlaw110
Copy link
Collaborator

can you send out the stacktrace?

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

No branches or pull requests

2 participants