2

In Hibernate 4.3.x, there is a method

org.hibernate.cache.spi.GeneralDataRegion.get(Object key)

But in Hibernate 5.x, this method signature is changed to

org.hibernate.cache.spi.GeneralDataRegion.get(SessionImplementor session, Object key)

Similarly new put method signature in Hibernate-5 is as follows :

public void put(SessionImplementor session, Object key, Object value)

Here what is SessionImplementor class and how to get its object? i.e., What will be the code substitution in Hibernate-5?

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
Nirav Patel
  • 1,304
  • 2
  • 13
  • 30

1 Answers1

2

I think following line gives SessionImplementor object:

SessionImplementor hibernateSession=((SessionImplementor)sessionFactory.getCurrentSession());
Pankaj Saboo
  • 1,125
  • 1
  • 8
  • 27