Skip to content

API consistency? db.createNode vs. node.createRelationShipTo #67

@kontrafiktion

Description

@kontrafiktion

As far as I understand the API (documentation):

GraphDatabase#createNode

only creates a node but does not persist it. On the other hand

Node#createRelationShipTo (/From)

not only creates the relationship but persists it as well. I stumbled upon this by accident, I "forgot" to save the relationship after creating it, but it was stored in the DB anyway.

I would propose to either very explicitly document that both "create..." methods behave differently or rename "createRelationship..." to to "saveRelationship..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions