refs #703: fix Smilegate annotation metadata query
This commit is contained in:
@@ -145,7 +145,7 @@ public class SchemaMetadataService {
|
||||
|
||||
private Map<String, List<SchemaAnnotation>> annotationsByTarget(String tableName) {
|
||||
Map<String, LinkedHashMap<String, List<String>>> grouped = new LinkedHashMap<>();
|
||||
for (SchemaMetadataAnnotationRow row : mapper.findAnnotations(OWNER, tableName)) {
|
||||
for (SchemaMetadataAnnotationRow row : mapper.findAnnotations(tableName)) {
|
||||
String target = row.columnName() == null
|
||||
? tableTargetKey()
|
||||
: columnTargetKey(row.columnName());
|
||||
@@ -169,8 +169,8 @@ public class SchemaMetadataService {
|
||||
|
||||
private boolean annotationExists(String tableName, String columnName, String annotationName) {
|
||||
return columnName == null
|
||||
? mapper.countTableAnnotation(OWNER, tableName, annotationName) > 0
|
||||
: mapper.countColumnAnnotation(OWNER, tableName, columnName, annotationName) > 0;
|
||||
? mapper.countTableAnnotation(tableName, annotationName) > 0
|
||||
: mapper.countColumnAnnotation(tableName, columnName, annotationName) > 0;
|
||||
}
|
||||
|
||||
private String requireColumn(String tableName, String columnName) {
|
||||
|
||||
Reference in New Issue
Block a user