Replies: 19 comments
-
could you provide a demo with GitHub to reproduce your issue. |
Beta Was this translation helpful? Give feedback.
-
try this "https://gitee.com/contraller/yage-hello/tree/hello-jpa/" |
Beta Was this translation helpful? Give feedback.
-
I download your project demo, not found about ShardingSphere anywhere. |
Beta Was this translation helpful? Give feedback.
-
I think your sql must be contains sharding_key column. |
Beta Was this translation helpful? Give feedback.
-
https://gitee.com/contraller/yage-hello/blob/hello-jpa/yage-demo/pom.xml |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
ShardingSphere not supprot route all nodes when you execute insert or save sql, Now.
|
Beta Was this translation helpful? Give feedback.
-
Maybe you can use sql comment way to update one data source, https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/special-api/sharding/hint/ |
Beta Was this translation helpful? Give feedback.
-
here is my log, this means my sql route to 2 node,aoo node? |
Beta Was this translation helpful? Give feedback.
-
so the solution is to find some way to change the source code of CrudRepository.save of spring jpa? to add some comment? |
Beta Was this translation helpful? Give feedback.
-
Yes, Please add your sharding_key in your sql where. |
Beta Was this translation helpful? Give feedback.
-
You can see SQL HINT? Is this suit you? |
Beta Was this translation helpful? Give feedback.
-
想到另一个办法,我可以在ComplexKeysShardingAlgorithm的实现类里获取到SQL信息吗?如果可以的话我也可以尝试着重新指定数据节点。 |
Beta Was this translation helpful? Give feedback.
-
Transaction english language, please. |
Beta Was this translation helpful? Give feedback.
-
@yage-czy Hi, any updage? |
Beta Was this translation helpful? Give feedback.
-
https://gitee.com/contraller/yage-hello/blob/hello-spring-batch&mybatis/yage-demo/src/main/java/org/yage/hello/demo/config/YageEmptyInterceptor.java |
Beta Was this translation helpful? Give feedback.
-
Hello , this issue has not received a reply for several days. |
Beta Was this translation helpful? Give feedback.
-
Hi, any update? |
Beta Was this translation helpful? Give feedback.
-
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
Beta Was this translation helpful? Give feedback.
-
hello, my project use jpa + shardingjdbc
when i use CrudRepository.save to save my data to database,jpa auto generated sql like
update table_a set field_a = 1 , field_ab = 2 where id = 3
but my sharding-key is another field "dealership_id"。So my sql execute route to all data node.
I would like to ask, is there any way to deal with this situation?
Beta Was this translation helpful? Give feedback.
All reactions