aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2016-08-30 03:31:39 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2016-08-30 03:31:39 +0000
commitf40b4f0cfd1e36da0f913e16a889d89a2cc8e329 (patch)
treeb2fa2a14f72c9cac194c5dd5c0fa345688715613 /src/main/java
parent06e6141baa44ab7338abbf1e0913c4233d4e48c4 (diff)
downloadjackcess-f40b4f0cfd1e36da0f913e16a889d89a2cc8e329.tar.gz
jackcess-f40b4f0cfd1e36da0f913e16a889d89a2cc8e329.zip
set fk type
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/mutateops@1016 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java3
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java1
2 files changed, 4 insertions, 0 deletions
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<IndexImpl>
/** 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();
}