问题描述:

I have the following code snippet working with hibernate 4.2.2:

Query query = session.getNamedQuery("Usuario.findById");

query.setLong("id", identificadorUsuario);

This is the query:

SELECT user FROM scsg.model.Usuario user WHERE user.idUsuario=:id

And it Works locally. But when I deploy to the server it launches following exception:

java.lang.IllegalArgumentException: Parameter id does not exist as a named parameter in [SELECT user FROM scsg.model.Usuario user WHERE user.idUsuario=:id]

Server is a Wildfly server. All POJO clases have their getters and setters. Any help?

相关阅读:
Top