Related discussion about the "Cannot define a primary key on a unique type" exception: https://groups.google.com/forum/#!topic/aureliusgraphs/KFVtfC9Xy94
First step: change this StandardTypeMaker
line to use the And operator between isUnique
:
if ((isUnique[0] && isUnique[1]) && !primaryKey.isEmpty()) throw new IllegalArgumentException("Cannot define a primary key on a unique type")
This allows an IN-unique or OUT-unique edge to use Titan's vertex-centric indexing. Note the unique(OUT)
in the example below: