Closed ysdxz207 closed 7 years ago
I saw the source code found that if I use quote then ":permissionName" will not be replaced with "?". So how should I write my sql?
This should work:
SQL: select * from permission where 1 = 1 and permission_name like :permissionName;
Java: query.addParameter("permissionName", "%select%")
Please report back if you still can't get it to work
It works! Thank you very much!
My sql is : select * from permission where 1 = 1 and permission_name like '%:permissionName%' ; I am using 'query.addParameter("permissionName", "select")'. Error is : Failed to add parameter with name 'permissionName'. No parameter with that name is declared in the sql.