Skip to content

Unable to pass '$count' parameter to randomElements provider #2

@dlobue

Description

@dlobue

The pattern (p:Power { level: {randomElements:[[-1,2,3], 4]}}) produces a Power node where the value of the level property is an array containing 1 item. It produces one of two nodes:

(:Power {level: [4]})

Or:

(:Power {level: [[-1,2,3]]})

I would expect it to create a node like the following:

(:Power {level: [-1,2,-1,3]})

The randomElement provider functions the same way.
The example provided by the docs ({ level: {randomElement:[[-1,2,3]] }}), results in a property with the value of [-1,2,3]. In order to get a result like the documentation says you should get, you have to flatten that array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions