Hy guys, thanks for the help. I`m having other problem now, i followed the steps that you said and reattached the object to the session. But i`m getting this error now:
Code:
Exception in thread "main" org.hibernate.HibernateException: reassociated object has dirty collection reference (or an array)
at org.hibernate.event.def.OnLockVisitor.processCollection(OnLockVisitor.java:67)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:104)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:64)
at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:58)
at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:129)
at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:75)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:57)
at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:472)
at daten.xmanager.model.dao.impl.HibernateComputadorDAO.carregarDependencia(HibernateComputadorDAO.java:55)
at daten.xmanager.model.dao.impl.HibernateComputadorDAO.carregarDependencia(HibernateComputadorDAO.java:47)
at daten.xmanager.negocio.models.ComputadorBO.carregarDependencia(ComputadorBO.java:56)
at daten.xmanager.negocio.SistemaFacade.listarPerifericosComputador(SistemaFacade.java:97)
at daten.xmanager.negocio.SistemaFacade.main(SistemaFacade.java:193)
If you know why, please help me agaiin :).
Alberto