Does anybody know that error?
Code:
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info)
the code is:
Code:
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
ListaUsuarios lu=new ListaUsuarios();
ArrayList list=new ArrayList();
Usuario object =(Usuario) session.createQuery("from Usuario as u where u.nombre=:nombre").setString("nombre", "Francisco").uniqueResult();
list.add(object);
lu.setId(2);
lu.setLusuarios(list);
session.save(lu);
session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();
thanks a lot