]> source.dussan.org Git - jackcess.git/commitdiff
set fk type
authorJames Ahlborn <jtahlborn@yahoo.com>
Tue, 30 Aug 2016 03:31:39 +0000 (03:31 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Tue, 30 Aug 2016 03:31:39 +0000 (03:31 +0000)
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
src/main/java/com/healthmarketscience/jackcess/impl/RelationshipCreator.java

index 0cf07cf83d1a23be2bed5b27cbfac6d5af96fa03..2d97e75689d95c491ca8ff1595d6626e365348f6 100644 (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;
 
index 64e5abb4221c0fc64a974e0151a0ccc8a43c93f4..a326700538c6dd177fb0e68634ae0075a691f59d 100644 (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();
     }