Skip to content

Enforcing the functional constraint even on entities without the preexisting_graph #27

@iosonopersia

Description

@iosonopersia

When adding an already existing entity to a set without importing it, it is currently possible to add triples that will be inserted into the persistent graph without enforcing the single-value constraint on the functional properties (since the preexisting_graph would be empty). This should be fixed.

Example:

br = graph_set.add_br(..., res=URIRef("<existing_br_uri>"), ...)
br.hasTitle("<title>")

In the example, the existing BibliographicResource could already have a title defined for it inside the persistent graph. Synchronising the above GraphSet would add a second title to the persistent entity (unless the two literals are exactly the same), thus breaking the functional constraint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions