Add check in scanner (#4518)

This commit is contained in:
Tadgh 2023-02-07 10:13:29 -08:00 committed by GitHub
parent e160325af6
commit d08995a5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -367,6 +367,9 @@ public class JpaModelScannerAndVerifier {
if (ourReservedWords.contains(theColumnName)) {
throw new IllegalArgumentException(Msg.code(1631) + "Column name is a reserved word: " + theColumnName + " found on " + theElement);
}
if (theColumnName.startsWith("_")) {
throw new IllegalArgumentException(Msg.code(2272) + "Column name "+ theColumnName +" starts with an '_' (underscore). This is not permitted for oracle field names. Found on " + theElement);
}
}
private static int calculateIndexLength(String[] theColumnNames, Map<String, Integer> theColumnNameToLength, String theIndexName) {