admin icon indicating copy to clipboard operation
admin copied to clipboard

Multiple resources with the same IRI

Open comxd opened this issue 6 years ago • 3 comments

In case of multiple resources with the same IRI, the hydraClient merge all into one?

Test case:

  • two resources, Offer1 and Offer2 (iri=http://schema.org/Offer)
  • one resource Order with OneToMany to Offer1
  • in the admin UI for the Order resource, all fields of resources Offer1 and Offer2 are included

comxd avatar May 23 '19 11:05 comxd

Shouldn't IRIs be unique?

nescim avatar Mar 02 '20 10:03 nescim

But how to manage in case of multiple entities with the same schema.org type/iri?

Example, two entities:

  • CustomerOrder (http://schema.org/Order)
  • SupplierOrder (http://schema.org/Order)

comxd avatar May 26 '20 13:05 comxd

IRIs such as Schema.org’s ones (which are unique, and explicitly identify the same type data type across the internet) are intended to be used in @type, not in @id. IRIs of your own resources must be unique.

Basically:

{
  "@id": "http://your-shop.com/orders/unique-id",
  "@type": "http://schema.org/Order"
}

dunglas avatar May 26 '20 19:05 dunglas