1 Mar 2006

Change Hibernate NamingStrategy from spring xml

Something usefull, I don't want to forget:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml"/>
<property name="namingStrategy" ref="namingStrategy"/>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="namingStrategy" class="org.hibernate.cfg.ImprovedNamingStrategy"/>


Technorati tags:

5 comments:

Rafael Chaves said...

Thanks, I am learning Spring and Hibernate and that was very helpful!

Anonymous said...

Indeed, thanks for posting.

Anonymous said...

Thanks also from me!!!

Anonymous said...

Thank you! I love you so much!

for IT the said...

Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online