前景提要
HDC调试需求开发(15万预算),能者速来!>>>
applicationContext.xml配置:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter"/> <property name="packagesToScan" value="org.yye.testJpa"/> <property name="jpaProperties"> <props> <!-- 命名规则 My_NAME->MyName --> <prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop> </props> </property> </bean> 实际使用时还是报 Unknown column,生成的sql中并没有按驼峰法反向转换过来:
select user0_.userId as userId1_0_, user0_.created as created2_0_, user0_.email as email3_0_, user0_.loginName as loginNam4_0_, user0_.loginPwd as loginPwd5_0_, user0_.name as name6_0_, user0_.phone as phone7_0_, user0_.roleId as roleId8_0_, user0_.sex as sex9_0_, user0_.status as status10_0_ from tb_user user0_ where user0_.loginName=?
求大神帮忙啊