admin
admin copied to clipboard
Multiple resources with the same IRI
In case of multiple resources with the same IRI, the hydraClient merge all into one?
Test case:
- two resources,
Offer1andOffer2(iri=http://schema.org/Offer) - one resource
Orderwith OneToMany toOffer1 - in the admin UI for the
Orderresource, all fields of resourcesOffer1andOffer2are included
Shouldn't IRIs be unique?
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)
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"
}