Hello Everyone! I would have the following question: //I have the current HQL query String preparedQuery = "from Author as author where author.name like '%" + nameSequence + "%'"; Query q = currentSession.createQuery(preparedQuery);
My question would be the following:How this query be rewritten so as to ensure protection against SQL injection? I tried to do it in the same manner as for the queries which used equality (i.e. =) however, then the query returned no results. Can anyone suggest other alternatives? Thanks in advance, Feri
|