I am getting this error which I really feel it's a bug
org.neo4j.cypher.internal.physicalplanning.ast.NullCheckReference
So lets take this from the beginning.
When I run this query everythinks works fine.
match (manufacturer)-[:HAS_BRAND]-(brand:Brand)-[:HAS_VARIANT]->(variants:Variant)
with manufacturer, brand, collect(variants) as variantList
unwind variantList as variant
Unwind range(1,variantList.nCars) as carID
return manufacturer,variant,carID
In my results and when checking the Table I see this:
manufacturer variant carID
{name:"VW",.. } {name:"Golf", nCars:12} 1
{name:"VW",.. } {name:"Golf", nCars:12} 2
{name:"VW",.. } {name:"Golf", nCars:12} 3
.....
{name:"VW",.. } {name:"Golf", nCars:12} 12
{name:"VW",.. } {name:"Tiguan", nCars:3} 1
{name:"VW",.. } {name:"Tiguan", nCars:3} 2
.............
So you can see the table looks alright.
But when I change my query to this.
match (manufacturer)-[:HAS_BRAND]-(brand:Brand)-[:HAS_VARIANT]->(variants:Variant)
with manufacturer, brand, collect(variants) as variantList
unwind variantList as variant
Unwind range(1,variantList.nCars) as carID
create (:Car {name: manufacturer.name + ' - ' + variant.name + ' - Car ' + carID})
.. I get the above error org.neo4j.cypher.internal.physicalplanning.ast.NullCheckReference
.
I notice that if I change the last line to create (:Car {name: manufacturer.name + ' - Car ' + carID})
everything works i.e. I removed the variant.name.
Anyway this doesn't make sense and also I want to have that name.
Please help