yyTraveler commented on issue #33368:
URL: 
https://github.com/apache/shardingsphere/issues/33368#issuecomment-2434145446

   by the way , this project also integrated the hibernate3.
   
   the query i use to test is like  
   ```sql
   select * from lcz_speech limit 10;
   ```
   
   i also tried the yaml config style and it's exactly the same problem.
   
   ```yaml
   databaseName:
     basicDataSource
   mode:
     type: Standalone
     repository:
       type: JDBC
   rules:
   - !SHARDING
     shardingAlgorithms:
       ps_t_history_result_interval:
         type: INTERVAL
         props:
           datetime-pattern: yyyy-MM-dd HH:mm:ss
           datetime-lower: '2022-01-01 00:00:00'
           sharding-suffix-pattern: yyyyMM
           datetime-interval-unit: MONTHS
     tables:
       lcz_speech:
         actualDataNodes: basicDataSource.lcz_speech_${202201..202512}
         tableStrategy:
           standard:
             shardingColumn: create_time
             shardingAlgorithmName: ps_t_history_result_interval
     bindingTables:
       - lcz_speech
   - !SINGLE
     tables:
       - "basicDataSource.*"
   ```
   
   ```java
   @Configuration
   public class YamlShardingConfiguration {
   
       @Resource(name = "basicDataSource")
       private DataSource dataSource;
   
       @Bean("shardingDataSource")
       public DataSource getDataSource() throws Exception {
           Map<String, DataSource> dataSourceMap = new HashMap<>();
           dataSourceMap.put("basicDataSource", dataSource);
   
           File yamlFile = new File("sharding.yaml");
           DataSource dataSource = 
YamlShardingSphereDataSourceFactory.createDataSource(dataSourceMap, yamlFile);
           return dataSource;
       }
   
   }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to