better Relation.hashCode()