久久久久久AV无码免费看大片,亚洲一区精品人人爽人人躁,国产成人片无码免费爱线观看,亚洲AV成人无码精品网站,为什么晚上搞的时候要盖被子

Spring boot jpa駝峰命名會被自動轉成數(shù)據(jù)庫下劃線命名

時間:2020-08-21 23:37:45 類型:JAVA
字號:    

Spring boot jpa駝峰命名會被自動轉成數(shù)據(jù)庫下劃線命名

例如:

@Query(value=" select * from sorts where parentId = ?1 order by orders asc ",nativeQuery=true )
public ArrayList<Sorts> selectByParentId(Integer id) ;

在查詢時會變成  where parent_id

從而造成 column parent_id不存在


解決方案:

在application.properties中添加

spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl

spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl


<