Hello kresho,
i do a tx.commit() but just within this:
Code:
Session s = SessionFactory.openSession();
Transaction tx = s.beginTransaction();
Query query = getSession().createQuery("SELECT o FROM <class> AS o");
List result = new ArrayList(query.list());
tx.commit();
As you see there im only do a query that do a SELECT, so i want to get all objects from table <class>. This code is from a method like "List getAll();"
I do no other call but this getAll() and change one object within the list in between, like here:
List list = getAll();
list.get(0).setSomething(0815);
list = getAll();
After this call he saved the value 0815 within the database automatically, without any save-call from my side. But i need to have it unchanged.
That refresh-method dont look too comfortable for my needs at this point as i have my list and would have to refresh every item in it and delete any new one.
oliver