Hi there !
I�m having problems on using the Query interface. When using the parameters facilities as coded below , Hibernate just doesn�t replace them by the variables values...
Query q = session.createQuery( "select * from Usuario where nome like '%:nome%'"
+ " and login like '%:login%'"
+ " and password like '%
assword%'");
It doesn�t work...
q = q.setProperties(usuario); // It�s supposed to replace the parameters by the bean properties with the same names...
Nor this alternative works...
q.setString("nome", usuario.getNome());
q.setString("login", usuario.getLogin());
q.setString("password", usuario.getPassword());
When I debug the query, It is this way after the assignment :
select * from Usuario where nome like '%:nome%'and login like '%:login%'and password like '%
assword%' ... with no replaces...
Any idea ?
Thanx in advance,
F�bio