{"action":"created","issue":{"url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/304","repository_url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc","labels_url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/304/comments","events_url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/304/events","html_url":"https://github.com/dangdangdotcom/sharding-jdbc/issues/304","id":245960797,"number":304,"title":"升级版本1.5.0.M3以后，连表查询的所有表都必须要配置上tableRule么？ 另外那个bindingTableRule是个什么用途 ？","user":{"login":"ijiaojian","id":10666509,"avatar_url":"https://avatars3.githubusercontent.com/u/10666509?v=4","gravatar_id":"","url":"https://api.github.com/users/ijiaojian","html_url":"https://github.com/ijiaojian","followers_url":"https://api.github.com/users/ijiaojian/followers","following_url":"https://api.github.com/users/ijiaojian/following{/other_user}","gists_url":"https://api.github.com/users/ijiaojian/gists{/gist_id}","starred_url":"https://api.github.com/users/ijiaojian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijiaojian/subscriptions","organizations_url":"https://api.github.com/users/ijiaojian/orgs","repos_url":"https://api.github.com/users/ijiaojian/repos","events_url":"https://api.github.com/users/ijiaojian/events{/privacy}","received_events_url":"https://api.github.com/users/ijiaojian/received_events","type":"User","site_admin":false},"labels":[{"id":620173159,"url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/labels/question","name":"question","color":"fbca04","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-27T08:16:01Z","updated_at":"2017-07-27T11:11:34Z","closed_at":"2017-07-27T08:30:43Z","body":"    1.5.0M3\r\n\r\nprivate RoutingResult route(final List<Object> parameters, final SQLStatement sqlStatement) {\r\n        Collection<String> tableNames = sqlStatement.getTables().getTableNames();\r\n        RoutingEngine routingEngine;\r\n        if (1 == tableNames.size() || shardingRule.isAllBindingTables(tableNames)) {\r\n            routingEngine = new SimpleRoutingEngine(shardingRule, parameters, tableNames.iterator().next(), sqlStatement);\r\n        } else {\r\n            // TODO 可配置是否执行笛卡尔积\r\n            routingEngine = new ComplexRoutingEngine(shardingRule, parameters, tableNames, sqlStatement);\r\n        }\r\n        return routingEngine.route();\r\n    }\r\n\r\n\r\n这是选择路由引起的一段代码，如果查询的表的张数等于1，或者查询的表都是bindingTable 才使用SimpleRoutingEngine ，否则使用ComplexRoutingEngine。 关键是使用ComplexRoutingEngine时，我查询的两个表没有配置TableRule，（理论上不需要分表的就可以不配置分表规则）， 结果在ComplexRoutingEngine里面就报错。throw new ShardingJdbcException(\"Cannot find table rule and default data source with logic tables: '%s'\", logicTables);\r\n\r\n想了解下，现在这个是这样设计的么?  必须给每张表配置分表规则 ？\r\n"},"comment":{"url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/comments/318332536","html_url":"https://github.com/dangdangdotcom/sharding-jdbc/issues/304#issuecomment-318332536","issue_url":"https://api.github.com/repos/dangdangdotcom/sharding-jdbc/issues/304","id":318332536,"user":{"login":"terrymanu","id":5516298,"avatar_url":"https://avatars1.githubusercontent.com/u/5516298?v=4","gravatar_id":"","url":"https://api.github.com/users/terrymanu","html_url":"https://github.com/terrymanu","followers_url":"https://api.github.com/users/terrymanu/followers","following_url":"https://api.github.com/users/terrymanu/following{/other_user}","gists_url":"https://api.github.com/users/terrymanu/gists{/gist_id}","starred_url":"https://api.github.com/users/terrymanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrymanu/subscriptions","organizations_url":"https://api.github.com/users/terrymanu/orgs","repos_url":"https://api.github.com/users/terrymanu/repos","events_url":"https://api.github.com/users/terrymanu/events{/privacy}","received_events_url":"https://api.github.com/users/terrymanu/received_events","type":"User","site_admin":false},"created_at":"2017-07-27T11:11:34Z","updated_at":"2017-07-27T11:11:34Z","body":"先不支持了，比较难做。以后有机会再支持"}}
{"actor":{"display_login":"terrymanu"}}