The recommended approach is to store the userName in all lower case, as an
additional field/column, and then do the toLowerCase on the incoming parameter
user name when you do the query and use that field/column that was stored in
lower case.
Kris wrote:
> Is there any way to perform a JDO query on google app engine using a
> case insensitive string comparison? e.g.
>
> For example,
> Query query = pm.newQuery(User.class, "userName.toLowerCase() ==
> user && password == pass");
> query.declareParameters("String user, String pass");
> query.setUnique(true);
> User user = (User) query.execute(userName.toLowerCase(),
> password);
>
> Of course GAE does not support the usage of toLowerCase() in the
> filter string.
>
> There's probably a terribly simple way to do this that I'm just not
> aware of.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=.