def attr_hash
      md5 = Digest::MD5.new
      @attributes.each do |k,v|
        md5.update "#{k}:#{v.attr_hash}"
      end
      md5.hexdigest
    end
def attr_hash
      md5 = Digest::MD5.new
      @attributes.each do |k,v|
        md5.update "#{k}:#{v.attr_hash}"
      end
      md5.hexdigest
    end
Create a new Entity with the specified name and optional Hash of attributes (String name to Entity, Collection or Primitive instances)
 Return a 128-bit hash as a hex string, representative of the unique set of fields and their types, including all subobjects.
 Internally, this is calculated as the MD5 of all field names and their type attr_hash calls.