diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2017-06-15 02:58:42 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2017-06-15 02:58:42 +0000 |
commit | c3d229ff33263f70358d45c8361fcf1ab689a5c7 (patch) | |
tree | 2ded1460a4140d4c6c2f7714d24f372ebcb05af8 | |
parent | 16fa12b67a699032bfb1846f5a7c0a32f91beede (diff) | |
download | jackcess-c3d229ff33263f70358d45c8361fcf1ab689a5c7.tar.gz jackcess-c3d229ff33263f70358d45c8361fcf1ab689a5c7.zip |
validate length of pre-defined relationship name
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1104 f203690c-595d-4dc9-a70b-905162fa7fd2
-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()); |