Java - property failed

 
Vista:

property failed

Publicado por VICTOR (1 intervención) el 03/01/2009 21:15:39
@SuppressWarnings("unchecked")
public List<FacturasEmitidas> findByProperty(String propertyName, final Object value) {
LogUtil.log("finding FacturasEmitidas instance with property: " + propertyName + ", value: " + value, Level.INFO, null);
try {
final String queryString = "select model from FacturasEmitidas model where model."
+ propertyName + "= :propertyValue";
Query query = entityManager.createQuery(queryString);
query.setParameter("propertyValue", value);
return query.getResultList();
} catch (RuntimeException re) {
LogUtil.log("find by property name failed", Level.SEVERE, re);
throw re;
}
}

CADA VES QUE HAGO UNA BUSQUEDA, LE PASO POR PROPERTYNAME= TIPOFACTURA, Y DE VALUE = 0, EL TIPOFACTURA ESTA DECLARADO EN MI TABLA EN LA BASE DE DATOS, PERO ME DA .. PORPERTYNAME FAILED???
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder