You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/05/16 08:42:56 UTC

[GitHub] [incubator-shardingsphere] softwbc commented on issue #2393: Error when use "spring.jpa.hibernate.naming.physical-strategy"

softwbc commented on issue #2393: Error when use "spring.jpa.hibernate.naming.physical-strategy"
URL: https://github.com/apache/incubator-shardingsphere/issues/2393#issuecomment-492976168
 
 
   ####### application.properties #######
   spring.jpa.show-sql=true
   spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
   ##hibernate 5.2.17.Final
   ##Java Model: private String cbOperationId; ==>Table field definition: `cbOperationId` 
   ##for field mapping
   ##MySQLSyntaxErrorException: Unknown column 'cb_operation_id' in 'field list'
   spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
   
   sharding.jdbc.datasource.names=test
   sharding.jdbc.datasource.test.type=com.alibaba.druid.pool.DruidDataSource
   sharding.jdbc.datasource.test.driver-class-name=com.mysql.jdbc.Driver
   sharding.jdbc.datasource.test.url=jdbc:mysql://localhost/test?characterEncoding=utf8&useSSL=false
   sharding.jdbc.datasource.test.username=root
   sharding.jdbc.datasource.test.password=root
   
   #sharding.jdbc.config.sharding.tables.t_doc_process.actual-data-nodes=test.t_doc_process_$->{0..9}
   #sharding.jdbc.config.sharding.tables.t_doc_process.table-strategy.inline.sharding-column=docId
   #sharding.jdbc.config.sharding.tables.t_doc_process.table-strategy.inline.algorithm-expression=test.t_doc_process_$->{docId % 10}
   
   #others
   sharding.jdbc.config.sharding.tables.my_friend.actual-data-nodes=test.my_friend_$->{0..9}
   sharding.jdbc.config.sharding.tables.my_friend.table-strategy.inline.sharding-column=user_id
   sharding.jdbc.config.sharding.tables.my_friend.table-strategy.inline.algorithm-expression=test.my_friend_$->{user_id % 10}
   
   
   Once the physical-strategy configuration is used, the above null pointer exception occurs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services