To make set method auto translated into a UPDATE clause, the
entitymanager should be opened after a transaction begins.
@PersistenceUnit(unitName="example")
EntityManagerFactory emf;
EntityManager em;
try {
ut.begin();
EntityManager em= emf.createEntityManager();
CourseBean updateCourse = em.find(CourseBean.class, new
Integer(1));
updateCourse.setCourse("Magic");
ut.commit();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (em != null && em.isOpen()) {
em.close();
}
}
_______________________________________________
resin-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/resin-interest