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

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -