Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL解析模块,并未解析o.id=i.id的场景 #54

Closed
terrymanu opened this issue Apr 29, 2016 · 1 comment
Closed

SQL解析模块,并未解析o.id=i.id的场景 #54

terrymanu opened this issue Apr 29, 2016 · 1 comment

Comments

@terrymanu
Copy link
Member

No description provided.

@terrymanu
Copy link
Member Author

使用bindingTable代替关联关系解析,但动态表不能使用bindingTable,所以需要在SQL中把每个表的sharding value都写进去。如:

SELECT i.order_id, i.order_item_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id = 1 AND o.order_id = 10000

改为

SELECT i.order_id, i.order_item_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id = 1 AND o.order_id = 10000 AND i.order_id = 10000

@terrymanu terrymanu changed the title [BUG] SQL解析模块,并未解析o.id=i.id的场景 SQL解析模块,并未解析o.id=i.id的场景 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant