Fix JPQLException : EntityTypeNotFound

If you specify the name of the entity the queries are not created
correctly because it uses the name of the class.