pkwenda commented on issue #4921: Is this UI module available ?
URL: 
https://github.com/apache/incubator-shardingsphere/issues/4921#issuecomment-603714874
 
 
   I have a question.
   
   Why YamlTableRuleConfiguration.java  not have `defaultKeyGenerator` and 
`defaultDatabaseStrategy` field ? 
   
   because I add this yml setting 
   
   ```
     tables:
       litemall_electronic_coupon_item:
         actualDataNodes: uat-litemall-$->{0}.litemall_electronic_coupon_item
         databaseStrategy:
           standard:
             shardingColumn: company_id   
             preciseAlgorithmClassName: 
org.apache.shardingsphere.ui.sharding.DataBaseShardingAlgorithm  
       litemall_coupon_user:
         actualDataNodes: uat-litemall-$->{0}.litemall_coupon_user
         databaseStrategy:
           standard:
             shardingColumn: user_id   
             preciseAlgorithmClassName: 
org.apache.shardingsphere.ui.sharding.DataBaseShardingAlgorithm  
     bindingTables:
       - litemall_electronic_coupon_item,litemall_coupon_user
     defaultDatabaseStrategy: # 默认分库 company_id
       standard:
         sharding-column: company_id
         preciseAlgorithmClassName: 
org.linlinjava.litemall.db.sharding.DataBaseShardingAlgorithm
     defaultKeyGenerator:
       type: SNOWFLAKE
       column: id
   ```
   it is wrong
   
    
   
![image](https://user-images.githubusercontent.com/14212375/77517427-0f1f4700-6eb7-11ea-9e83-87cc7b1b2aeb.png)
   
   
   
   but I write another way is ok (del defaultXXX yml key ):
   
   ```
     tables:
       litemall_electronic_coupon_item:
         actualDataNodes: uat-litemall-$->{0}.litemall_electronic_coupon_item
         databaseStrategy:
           standard:
             shardingColumn: company_id   
             preciseAlgorithmClassName: 
org.apache.shardingsphere.ui.sharding.DataBaseShardingAlgorithm  
         keyGenerator:
           type: SNOWFLAKE
           column: order_item_id    
       litemall_coupon_user:
         actualDataNodes: uat-litemall-$->{0}.litemall_coupon_user
         databaseStrategy:
           standard:
             shardingColumn: user_id   
             preciseAlgorithmClassName: 
org.apache.shardingsphere.ui.sharding.DataBaseShardingAlgorithm  
         keyGenerator:
           type: SNOWFLAKE
           column: order_item_id    
     bindingTables:
       - litemall_electronic_coupon_item,litemall_coupon_user
   
   ```
   
   Was it designed this way ? OR BUG ?
   
   IF it is bug , Can I fix it ?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to