Thanks Tenwit, and sorry for the inconvinience coused from mistakes in test results.
Those mistakes are due to the manual editing to make it clear for displaying purposes. Actually There are no repeated entries or omitted entries.
And also the mapping files and other files are identical in both tests.
test run 1 test run 2 test run 3
Name2 Name3 Name4
Name1 Name4 Name1
Name3 Name1 Name3
Name4 Name2 Name2
Code:
public Application readApplication(Long id){
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
Application app = (Application) session.load(Application.class, id);
session.getTransaction().commit();
return app;
}
Code:
Application app = businessServises.readApplication(id);
Set users = app.gerUsers();
for(int i=0; i<users.size;i++){
User u = (User)users.toArray()[i];
System.out.println(u.getName());
}
Any more help is highly admired.
Thank you