Browse Source

set fk type

git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/mutateops@1016 f203690c-595d-4dc9-a70b-905162fa7fd2
tags/jackcess-2.1.5
James Ahlborn 7 years ago
parent
commit
f40b4f0cfd

+ 3
- 0
src/main/java/com/healthmarketscience/jackcess/impl/IndexImpl.java View File

@@ -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;


+ 1
- 0
src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java View File

@@ -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();
}

Loading…
Cancel
Save