Closed mpreusse closed 3 years ago
This is a good point, and is a result of the internal normalisation of the node keys. If only one primary key name is provided, the query looks for a single value; if multiple primary key names are provided, it looks for a tuple of values.
I've deliberately avoided pre-processing the data for performance reasons, but introducing this is the best way I can think of to allow both forms to be provided. This means (I think) that performance will be slightly affected when a 1-tuple is provided, but this seems like a worthwhile trade-off for simplicity of interface.
I'll add a PR for you to try.
The new bulk function to create relationships does not work with a tuple of length 1 as relationship data input.
This works:
This will not create realationships:
I would suggest to also allow tuples of length 1 to provide a generic interface for functions that create relationship data. Right now, you have to check the number of values to decide if you add one value or a tuple fo values.
Here is a full example, the second batch of relationships is not created.