Examples of ForeignKeyIndexRequiredException


Examples of com.foundationdb.server.error.ForeignKeyIndexRequiredException

        for (Table table : ais.getTables().values()) {
            for (ForeignKey foreignKey : table.getForeignKeys()) {
                if (foreignKey.getReferencingTable() == table) { // Only check once
                    foreignKey.findIndexes();
                    if (foreignKey.getReferencingIndex() == null) {
                        output.reportFailure(new AISValidationFailure(new ForeignKeyIndexRequiredException(foreignKey.getConstraintName().getTableName(), foreignKey.getReferencingTable().getName(), foreignKey.getReferencingColumns().toString())));
                    }
                    if (foreignKey.getReferencedIndex() == null) {
                        output.reportFailure(new AISValidationFailure(new ForeignKeyIndexRequiredException(foreignKey.getConstraintName().getTableName(), foreignKey.getReferencedTable().getName(), foreignKey.getReferencedColumns().toString())));
                    }
                }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.