Comments (4)
naming-strategy用来配置hiberator的命名规则,没有过时一说。比如命名中有大小的规则,在类中有userId,那么在数据库中就应该表示为:user_id,这也可以用注解@column(name="user_id")显式的设定。
有关这方面的说明,你可以查看hiberator的说明文档。
from spring-boot-db.
感谢您的解答,hibernate5中naming-strategy不建议使用,请看下面截图,请问如果替换呢
from spring-boot-db.
这里用的是一个配置参数名字:naming-strategy,不是引用这个类org.hibernate.cfg.naming-strategy,而是使用这个参数引用了这个类:org.hibernate.cfg.ImprovedNamingStrategy,这个参数名字naming-strategy不会有过时的说法。
from spring-boot-db.
补充说明:因为一直在使用,包括更高的版本并未受到影响。如果会有影响的话可以考虑下面替代方法:
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
from spring-boot-db.
Related Issues (13)
- java.sql.SQLException: Incorrect string value: '\xE5\xBC\x80\xE5\x8F\x91...' for column 'name' at row 1 HOT 3
- jpa单元测试一直报如下错误,请问该如何解决?springboot版本2.0.3 HOT 2
- 代码报错 org.springframework.beans.factory.BeanCreationException: Error creating bean with name xxx HOT 1
- 使用V2.0分支,修改neo4j的配置后运行,报neo4j语法错误,使用的neo4j的版本是neo4j-community-3.0.7,麻烦作者帮忙解答下。 HOT 4
- java.lang.IllegalStateException: Failed to load ApplicationContext HOT 1
- Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; HOT 1
- Error creating bean with name 'movieRepository': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities) HOT 1
- 第二章 在springBoot中使用数据库mysql篇dbdemo.mysql.test.JpaConfiguration.java需要手动编写吗 HOT 3
- [建议] 使用分支的形式代替子模块
- 为什么下载下来,到 IDEA 运行还是会出错 HOT 3
- 建议更新MySQL部分的readme HOT 2
- 在Mac运行下报错 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot-db.