Hi,

We have the following named query in JPA which we want to execute on
the datastore

@NamedQuery(name="User.findActiveByUsernamePattern",
                query="SELECT DISTINCT user " +
                                "FROM User as user " +
                                "WHERE firstName like :pattern OR lastName like 
:pattern " +
                                "AND active = true " +
                                "ORDER BY firstName")

when we execute the test, we get the following error

org.datanucleus.store.appengine.query.DatastoreQuery
$UnsupportedDatastoreFeatureException: Problem with query <SELECT FROM
User as user WHERE firstName like :pattern OR lastName like :pattern
AND active = true ORDER BY firstName>: 'or' filters can only check
equality

What is the best way to resolve this? we can write 2 queries one for
firstName and other for lastname but that is ugly.

Regards | Vikas
www.inphina.com
www.thoughts.inphina,com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en.

Reply via email to