Fix Relationship, and property isPrimary, and isIndex
Merge