Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalSessionFactoryBean in Spring 3.1.0.RC1 unable to set NamingStrategy [SPR-8864] #13506

spring-projects-issues opened this issue Nov 21, 2011 · 1 comment
in: core type: enhancement


Copy link

spring-projects-issues commented Nov 21, 2011

John Kroubalkian opened SPR-8864 and commented

org.springframework.orm.hibernate4.LocalSessionFactoryBean missing ability to set NamingStrategy (this ability is available in org.springframework.orm.hibernate3.LocalSessionFactoryBean)

Not sure if this is a bug (or by design) but since there has been no response on forum ( thought I'd post it as an issue. If this is not recommended procedure or if should be posted to another project please let me know.

Also, the Component/s section above does not include a SpringORM item.

The hibernate 3 version of LocalSessionFactoryBean (org.springframework.orm.hibernate3.LocalSessionFactoryBean) had a property of org.hibernate.cfg.NamingStrategy that could be set in xml:

<bean id="sessionFactory"
	<property name="dataSource">
		<ref bean="myDataSource" />
	<property name="namingStrategy">
		<ref bean="myNamingStrategy" />

The hibernate 4 version of LocalSessionFactoryBean (org.springframework.orm.hibernate4.LocalSessionFa ctoryBean) does not have this property.

I tried using an hibernate.ejb.naming_strategy entry in the hibernateProperties property but it had no effect:

<bean id="legacy.sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
                <property name="dataSource">
                        <ref local="myDataSource" />
                <property name="packagesToScan">
                <property name="hibernateProperties">
                                <prop key="hibernate.dialect">${hibernate.legacy.dialect}</prop>
                                <prop key="hibernate.show_sql">${hibernate.legacy.show_sql}</prop>
                                <prop key="hibernate.ejb.naming_strategy"></prop>
                                <prop key="hibernate.cache.region.factory_class">${hibernate.legacy.cache.region.factory_class}</prop>

Referenced from: commits 93db3df

Copy link
Collaborator Author

spring-projects-issues commented Nov 27, 2011

Juergen Hoeller commented

Good catch! We've added a corresponding "namingStrategy" property to the Hibernate 4 LocalSessionFactoryBean variant for Spring 3.1 RC2 (which is scheduled for immediate release).


@spring-projects-issues spring-projects-issues added type: enhancement in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1 RC2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: enhancement
None yet

No branches or pull requests

2 participants