Skip to content

When moving a node, do we need to mention both source and target parent? #227

Description

@enikao

Assume the repository contains node with id x and y. x contains y as child.

We send a store request to move y from its previous parent x to its new parent z.
We don't change y in any other way.

Which nodes do we need to send in the request?

Option A: Mention both previous (x) and new parent (z)

Pro:

  • No implicit changes

Con:
Client needs to know the previous parent. How to announce this in bulk API to client?
If the repo does not announce it, the client has to loop over every node used as child/annotation (because the client does not know which move failed), retrieve its parent, and send the parent along.

Option B: Send only old parent (x)

Makes no sense -- how would we know y is moved?

Option C: Send only new parent (z)

Pro:
Fits with bulk idea: Client sends how the world should be

Con:

  • Implicit changes to previous parent (x)

Option D: Send only child (y) and mention its new parent

Does not work: if z contains y in a multi-value containment (or as annotation), at which position do we enter y?

Decision: Option C: Send only new parent

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions