Closed tobiasschweizer closed 2 years ago
Hi @tobiasschweizer ,
The following call:
person_mapped.affiliation = org_mapped
will copy as value of person_mapped.affiliation the dict in org_mapped.
If you only want to refer to org_mapped, I recommend to do:
person_mapped.affiliation = Resource.from_json({"@id": org_mapped.id, "@type":"Organization"})
This way you don't duplicate the organisation payload and do not have to handle consistency.
With BlueBrainNexus store, a call to :
forge.register(org_mapped)
should add an 'id' attribute to the payload.
Hi
I have a question regarding the representation of linked resources in JSON-LD on creation/update.
Example:
The type
Person
can link to anOrganization
via theaffiliation
property.And then in Nexus I see the following data:
and
In Nexus, there are now two instances: a
Person
linking to anOrganization
. But theOrganization
is also embedded inside the JSON-LD representing thePerson
.Is
Organization
stored redundantly in Nexus? What happens if theOrganization
resource is mutated (consistency of the data embedded inPerson
)?Does the compacted JSON-LD correspond to the original payload sent to the Nexus Delta API (I noted that the
@id
is missing: I assume this is because the@id
was created by the system and is thus not part of the payload)?