Giter Site home page Giter Site logo

Comments (4)

chenfromsz avatar chenfromsz commented on July 18, 2024

naming-strategy用来配置hiberator的命名规则,没有过时一说。比如命名中有大小的规则,在类中有userId,那么在数据库中就应该表示为:user_id,这也可以用注解@column(name="user_id")显式的设定。
有关这方面的说明,你可以查看hiberator的说明文档。

from spring-boot-db.

zcjlq avatar zcjlq commented on July 18, 2024

感谢您的解答,hibernate5中naming-strategy不建议使用,请看下面截图,请问如果替换呢
2017-09-04 17 24 25
2017-09-04 17 28 22

from spring-boot-db.

chenfromsz avatar chenfromsz commented on July 18, 2024

这里用的是一个配置参数名字:naming-strategy,不是引用这个类org.hibernate.cfg.naming-strategy,而是使用这个参数引用了这个类:org.hibernate.cfg.ImprovedNamingStrategy,这个参数名字naming-strategy不会有过时的说法。

from spring-boot-db.

chenfromsz avatar chenfromsz commented on July 18, 2024

补充说明:因为一直在使用,包括更高的版本并未受到影响。如果会有影响的话可以考虑下面替代方法:
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

from spring-boot-db.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.