Hibernate 4 + Spring 3.1 Configuration Object

Move Im from hibernate 3 app to hibernate 4 app.

Currently trying to figure out how to get the configuration object from hibernate4 LocalSessionFactoryBean found in org.springframework.orm.hibernate4.LocalSessionFactoryBean.

In the class org.springframework.orm.hibernate3.LocalSessionFactoryBean class, there is a getter method for the Configuration class.

In hibernate4, they use LocalSessionFactoryBuilder (which extends the configuration object) as a serviceregistry provision. In version 3 you can get this configuration object, in version 4 it is forbidden, why? and how can i still get this object?

Greetz

Niels

+4
source share
2 answers

An error has been reported about this. It looks like this will be added back in Spring 3.1.1.

https://jira.springsource.org/browse/SPR-8961

+1
source

For now, just copy localsessionfactorybean and show the configuration object (sessionfactorybuilder)

0
source

Source: https://habr.com/ru/post/1392368/


All Articles