feat (Relation.php) add getPrimaryKey()
feat (Constraint.php) add methods to check type of constraint