@Override
    public boolean equals(Object rhs) {
        return  super.equals(rhs)
                && (rhs instanceof ReferenceDataType)
                && targetType.equals(((ReferenceDataType) rhs).targetType);
    }
Creates a new type where the numeric ID is based on the hash of targetType
document/src/main/java/com/yahoo/document/ReferenceDataType.java