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 2020/02/29 08:21:29 UTC

[GitHub] [incubator-shardingsphere] phoema opened a new issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

phoema opened a new issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527
 
 
   ## Question
   
   **For English only**, other languages will not accept.
   when I use with hintManager mode
   define a java class public class HintShardingStrategy implements HintShardingAlgorithm<String>
   I write rule in hint-databases-only.yaml like this
   shardingRule:
     tables:
       quartz_user_monitor:
         databaseStrategy:
           hint: #Hint分片策略
             algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy
       biz_fee:
         databaseStrategy:
           hint: #Hint分片策略
             algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy
       biz_official_notice:
         databaseStrategy:
           hint: #Hint分片策略
             algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy
       case_info:
         databaseStrategy:
           hint: #Hint分片策略
             algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy
       sys_fee:
         databaseStrategy:
           hint: #Hint分片策略
             algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy
   
   
   use sql in mapper.xml
   like select * from a left join b on xxx left join c on xxx
   
   but it does not work good. can not go into dosharding function.
   
   when I tried with single table like delete or insert .it work good. can go into dosharding function
   
   delete * from a where xxx
   insert 
   
   what am i wrong?
   
   
   By the way:
   I change mode with PreciseSharding like this:
   public class StdDatabaseShardingAlgorithm implements PreciseShardingAlgorithm<String> {
   
   mutiy table select do not work too.
   
   what am i wrong?
   
   
   
   
   ![image](https://user-images.githubusercontent.com/8730272/75603985-1ef17880-5b0f-11ea-99b6-4eedd4cb265b.png)
   ![image](https://user-images.githubusercontent.com/8730272/75603987-29137700-5b0f-11ea-94ae-30b4bd81e0f6.png)
   
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-593220151
 
 
   Do not support subquery for 4.x

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-593047120
 
 
   thanks a lot!
   
   another question
   Can I define only the default sharding database rules with not define tableRule
   
   I want the table structure of each instance is exactly the same based on the every database splitting operation of tenantid
   
   Is there any way to use table rules without defining each table
   
   I try to comment out the table definition in the tablerule, but console log:
   ![image](https://user-images.githubusercontent.com/8730272/75618749-9fff4d00-5bad-11ea-9901-d69c563b513b.png)
   
   org.apache.shardingsphere.underlying.common.config.exception.ShardingSphereConfigurationException: Cannot find table rule and default data source with logic table: 'QRTZ_TRIGGERS'
   
   QRTZ_TRIGGERS must define in shardingRule.tables.QRTZ_TRIGGERS ?
   have a default way to define all tables?

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-595259038
 
 
   #3841

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-595169466
 
 
   #4582

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-595168471
 
 
   my userd version is 5.0.0-RC1-SNAPSHOT  with master branch source.
   Will future versions support the subquery or the support plan?
   
   Special business methods are complex to write
   
   for example subquery:
     
   
   SELECT  *  FROM (
           SELECT
           `tbl_biz`.*,
           `tmp`.`payer_name` AS `payer_name`
           FROM
           `biz_fee_unipay` `tbl_biz`
           LEFT JOIN
           (
           SELECT
           `t1`.`type` AS `payer_type`,
           `t1`.`name` AS `payer_type_name`,
           `t2`.`value` AS `payer_id`,
           `t2`.`name` AS `payer_name`
           FROM
           (
           `sys_dict_type` `t1`
           LEFT JOIN `sys_dict_data` `t2` ON ((

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] kimmking commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-592929567
 
 
   Ensure your mapper using shardingDataSource
   
   You can learn more from https://github.com/apache/incubator-shardingsphere/tree/master/examples/sharding-jdbc-example/sharding-example
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] terrymanu closed issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527
 
 
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] menghaoranss commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table?

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #4527: sharding-jdbc-core v 4.0.0 not support mybatis about xml with multi table? 
URL: https://github.com/apache/incubator-shardingsphere/issues/4527#issuecomment-593106024
 
 
   > thanks a lot!
   > 
   > another question
   > Can I define only the default sharding database rules with not define tableRule
   > 
   > I want the table structure of each instance is exactly the same based on the every database splitting operation of tenantid
   > 
   > Is there any way to use table rules without defining each table
   > 
   > I try to comment out the table definition in the tablerule, but console log:
   > ![image](https://user-images.githubusercontent.com/8730272/75618749-9fff4d00-5bad-11ea-9901-d69c563b513b.png)
   > 
   > org.apache.shardingsphere.underlying.common.config.exception.ShardingSphereConfigurationException: Cannot find table rule and default data source with logic table: 'QRTZ_TRIGGERS'
   > 
   > QRTZ_TRIGGERS must define in shardingRule.tables.QRTZ_TRIGGERS ?
   > have a default way to define all tables?
   
   @phoema , Which version of ShardingSphere did you use? Can you provide a complete configuration.

----------------------------------------------------------------
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