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 2022/12/28 09:22:11 UTC

[GitHub] [shardingsphere] SHADOW-LI0327 commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

SHADOW-LI0327 commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1366497949

   > > same issue
   > > ```
   > > - !SHARDING
   > >     tables:
   > >       t_order: 
   > >         actualDataNodes: ds_${0..1}.t_order_${1..12}
   > >         keyGenerateStrategy:
   > >           column: id
   > >           keyGeneratorName: snowflake
   > >     defaultDatabaseStrategy:
   > >       standard:
   > >         shardingColumn: id
   > >         shardingAlgorithmName: database-inline
   > >     defaultTableStrategy: 
   > >       standard:
   > >         shardingColumn: create_time
   > >         shardingAlgorithmName: date-interval
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > if `actualDataNodes` set `ds_0.t_order_${1..12}` works the `databaseStrategy` not working ?
   > 
   > try ds_0.t_order_${1..6}, ds_1.t_order_${7..12}
   
   `algorithm-expression` make me confused,finally i use ide plugin test script,my config is bellow,it's worded
   
   ```yml
   actualDataNodes: ds_${0..1}.t_order_${1..12}
   algorithm-expression: ds_${System.currentTimeMillis() % 2}
   algorithm-expression: t_order_${new Date().month + 1}
   ```
   
   still testing, but thanks


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org