Hola...
tengo un problema con JPA....
cuando intento hacer una busqueda de algun dato en alguna entidad....por ejemplo:
Código:
Entidad t = em.find(Tabla.class, variable);
obtiene bien el dato....pero.......si modifico algo en la base de datos (manualmente)
y vuelvo a hacer esto:
Código:
Entidad t = em.find(Tabla.class, variable);
me regresa el mismo valor de antes y no el actual.
Gracias.
Código:
public class Persiste{
static EntityManagerFactory emf;
.
.
.
emf = Persistence.createEntityManagerFactory("algun_nombreJPA",props);
}
Código:
public class Tabla {
public Tabla(EntityManagerFactory emf) {
em = emf.createEntityManager();
}
public TablaCtcc getValor(String variable) {
TablaCtcc t = em.find(Tabla.class, variable);
return t;
}
}
NO ME MARCA NINGUN ERROR.....SOLO NO ME MUESTRA LOS DATOS ACTUALIZADOS....
gracias :)