Joined: Mon Apr 05, 2004 10:40 am Posts: 19
|
i wrote this code:
ConnectionFactory con = new ConnectionFactory().getInstance.getSession();
Collection lepb = new HashSet();
try
{
Solution sol = new Solution();
Transaction tx = sess.beginTransaction();
Probleme test = (Probleme) sess.load(Probleme.class, id_probleme);
Query query =
sess.createQuery(
" from com.cosoftware.Probleme probl where probl.id=2");
lepb = query.list();
....
sol.setProbleme(test);test.getSolutions().add(sol);
tx.commit();
sess.flush();
The problem is :
i obtain this execption:Found shared references to a collection.
Thanks for help me.
|
|