hibernate - Passing parameter to HQL -


i have 1 variable long[] ids = [10, 11] , trying fire query :

query query2 = session.createquery("update employee e set e.islatest = false e.id not in (:ids)"); query2.setparameter("ids", ids); query2.executeupdate(); 

but getting error

org.postgresql.util.psqlexception: error: operator not exist: bigint <> character varying   hint: no operator matches given name , argument type(s). might need add explicit type casts. 

how can pass array variable in not in parameter? or there other way handling such query ?

try

query2.setparameterlist("ids", ids); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -