Search Results

Search found 1 results on 1 pages for 'user2519543'.

Page 1/1 | 1 

  • Is there any difference in which order I createCriteria and beginTransaction using Hibernate?

    - by user2519543
    Just wondering is there any difference when I beginTransaction [org.hibernate] before or after creating Criteria/Query etc.? example 1: ... Transaction tx= session.beginTransaction(); Criteria c = session.createCriteria(class); result = c.uniqueResult(); tx.commit(); ... example 2: ... Criteria c = session.createCriteria(class); Transaction tx= session.beginTransaction(); result = c.uniqueResult(); tx.commit(); ... Thanks.

    Read the article

1