I am migrating my windows based Spring - Hibernate application to Amazon AWS. I am getting issues with the Database since the table names in Amazon RDS starts with uppercase letter when hibernate creates them.
eg: userlogin_permissions in Windows local Mysql changes to Userlogin_permissions.
Due to this above error , my server cannot connect to the table and is not working.
I tried using
<prop key="org.hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
but is not helping.
The following is my xml structure :
<beans profile="awsSql">
<bean class="org.apache.tomcat.jdbc.pool.DataSource" id="dataSource">
<property name="url" value="jdbc:mysql://-----------"/>
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="username" value="@@@@@@@"/>
<property name="password" value="##########"/>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="***-jpa"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaDialect">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"/>
</property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="false"/>
<property name="generateDdl" value="true"/>
<property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect"/>
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="org.hibernate.envers.auditTablePrefix"></prop>
<prop key="org.hibernate.envers.auditTableSuffix">_AUD</prop>
<prop key="org.hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
<!--<prop key="org.hibernate.ejb.naming_strategy">org.hibernate.cfg.DefaultNamingStrategy</prop>-->
<!--<prop key="hibernate.cache.provider_class">org.hibernate.cache.SingletonEhCacheProvider</prop>-->
<!--<prop key="hibernate.cache.provider_configuration">/META-INF/cache/ehcache.xml</prop>-->
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<!--<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop>-->
<prop key="hibernate.generate_statistics">false</prop>
</props>
</property>
</bean>
Is there any way in which I can either make RDS use case-insensitive MYSQL , or make hibernate consistent in all OS.
I have already gone through the other related questions in here , but couldn't solve my problem.