String parentTable = null;
for (String checkTable : checkTables) {
FTable table = reader.getSchema(checkTable);
if(table.getTableType() == FTable.TableType.ROOT) {
if(parentTable != null && !parentTable.equals(table.getTableName())) {
throw new TransactionParseException("in a transaction can be no more than one parent table");
} else {
parentTable = table.getTableName();
}
} else {
if(parentTable != null && (!parentTable.equals(table.getParentName()))) {
throw new TransactionParseException("in a transaction can be no more than one parent table. and others must be the parent's child");
} else {
parentTable = table.getParentName();
}
}