java - String concatenation in jdo query -


i trying query like search on concatenated results. in sql this: where firstname + ' ' + lastname '%namesearch%'

when trying in jdo this:

query q = pm.newquery(user.class); map<string, object> args = new hashmap<string, object>(); args.put("search", search); q.setfilter("(user.firstname + ' ' + user.lastname).indexof(:search) >= 0"); q.executewithmap(args); 

however doing results in parsing exception.

portion of expression not parsed: (:search) >= 0

is possible concatenated expression searches in jdo this?

the problem see forgot call q.declareparameters("string search")


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -