From f40b4f0cfd1e36da0f913e16a889d89a2cc8e329 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Tue, 30 Aug 2016 03:31:39 +0000 Subject: set fk type git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/mutateops@1016 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java | 3 +++ .../com/healthmarketscience/jackcess/impl/RelationshipCreator.java | 1 + 2 files changed, 4 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java index 0cf07cf..2d97e75 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java @@ -56,6 +56,9 @@ public class IndexImpl implements Index, Comparable /** index table type for the "primary" table in a foreign key index */ static final byte PRIMARY_TABLE_TYPE = (byte)1; + /** index table type for the "secondary" table in a foreign key index */ + static final byte SECONDARY_TABLE_TYPE = (byte)2; + /** indicate an invalid index number for foreign key field */ private static final int INVALID_INDEX_NUMBER = -1; diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java index 64e5abb..a326700 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java @@ -130,6 +130,7 @@ public class RelationshipCreator extends DBMutator otherTableNum = _secondaryTable.getTableDefPageNumber(); otherIdxNum = _secondaryTable.getLogicalIndexCount(); } else { + tableType = IndexImpl.SECONDARY_TABLE_TYPE; otherTableNum = _primaryTable.getTableDefPageNumber(); otherIdxNum = _primaryTable.getLogicalIndexCount(); } -- cgit v1.2.3