@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RelationshipFamilyEntity that = (RelationshipFamilyEntity) o;

        if (relationshipId != that.relationshipId) return false;
        if (familyId1 != null ? !familyId1.equals(that.familyId1) : that.familyId1 != null) return false;
        if (familyId2 != null ? !familyId2.equals(that.familyId2) : that.familyId2 != null) return false;

        return true;
    }