strongduanmu commented on issue #11299:
URL:
https://github.com/apache/shardingsphere/issues/11299#issuecomment-878809065
@2241101100 Which table query triggered this exception? If the table cannot
find the corresponding table rule, this exception will occur.
```java
/**
* Generate key.
*
* @param logicTableName logic table name
* @return generated key
*/
public Comparable<?> generateKey(final String logicTableName) {
Optional<TableRule> tableRule = findTableRule(logicTableName);
if (!tableRule.isPresent()) {
throw new ShardingSphereConfigurationException("Cannot find
strategy for generate keys.");
}
KeyGenerateAlgorithm keyGenerator = null !=
tableRule.get().getKeyGeneratorName() ?
keyGenerators.get(tableRule.get().getKeyGeneratorName()) :
defaultKeyGenerateAlgorithm;
return keyGenerator.generateKey();
}
```
--
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]