bug fix [ 1651801 ] GenerateModel: duplicate "getKeyNamePair" methods
* added carlos suggestion: now if there are more then one primary identifiers for a table, entire generation will fail
This commit is contained in:
parent
a4e7b53309
commit
ead0410b81
|
@ -278,9 +278,15 @@ public class GenerateModel
|
||||||
defaultValue, ValueMin, ValueMax, VFormat,
|
defaultValue, ValueMin, ValueMax, VFormat,
|
||||||
Callout, Name, Description, virtualColumn, IsEncrypted));
|
Callout, Name, Description, virtualColumn, IsEncrypted));
|
||||||
//
|
//
|
||||||
if (!isKeyNamePairCreated && seqNo == 1 && "Y".equals(rs.getString("IsIdentifier"))) {
|
if (seqNo == 1 && "Y".equals(rs.getString("IsIdentifier"))) {
|
||||||
sb.append(createKeyNamePair(columnName, displayType));
|
if (!isKeyNamePairCreated) {
|
||||||
isKeyNamePairCreated = true;
|
sb.append(createKeyNamePair(columnName, displayType));
|
||||||
|
isKeyNamePairCreated = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new RuntimeException("More than one primary identifier found "
|
||||||
|
+ " (AD_Table_ID=" + AD_Table_ID + ", ColumnName=" + columnName + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
|
|
Loading…
Reference in New Issue