What is the fastest way to get the persisted object after calling Hibernate's saveOrUpdate?
- by Dave
I'm using Hibernate 3.2.1.ga, hibernate annotations 3.2.1.ga, and hibernate-jpa-2.0-api. I can't upgrade at this time as I'm working with legacy code. I have this generic method for saving or updating objects ...
protected void saveOrUpdate(Object obj) {
final Session session = sessionFactory.getCurrentSession();
…