diff options
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java index 4408678..77caaa4 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java @@ -170,6 +170,11 @@ public class RelationshipCreator extends DBMutator "Two valid tables are required in relationship")); } + if(_name != null) { + DatabaseImpl.validateIdentifierName( + _name, _primaryTable.getFormat().MAX_INDEX_NAME_LENGTH, "relationship"); + } + _primaryCols = getColumns(_primaryTable, _relationship.getFromColumns()); _secondaryCols = getColumns(_secondaryTable, _relationship.getToColumns()); |