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
Post a Comment