I am using the following filter in my data object: @FilterDef(name="accountDecryption", parameters=@ParamDef(name="password", type="java.lang.String"))
and using the below formula to decrypt(DB2) the encrypted account_number: @Formula( "decrypt_char(account_number,:accountDecryption.password)")
and I am setting the parameter prior to the query being fired as such: template.getSession().enableFilter("accountDecryption").setParameter("password", "[password_Location]");
The filter parameter gets set properly, but the Formula does not populate with the actual value, the hql is as follows: decrypt_char(employerba0_.account_number,:accountDecryption.password)
I get a DB2 (-313) error: THE NUMBER OF HOST VARIABLES SPECIFIED IS NOT EQUAL TO THE NUMBER OF PARAMETER MARKERS
Does anyone have any insight into this problem or another way to implement an sql function with annotations?
|