I noticed my tests started failing for a library I run based on map projections. I use the base Matrix data for my tests, and I have one for a map projection. Previously, referencing a property from a returned node in a map projection had no effect on the data returned for the node. Now, using that property in a projection will NULL out the property on the returned node.
Query:
MATCH (p:Person {name: 'Keanu Reeves'})-[actedIn:ACTED_IN]->(m:Movie)
OPTIONAL MATCH (m)<-[:ACTED_IN]-(p2:Person)
OPTIONAL MATCH (m)<-[:DIRECTED]-(d:Person)
WITH
p AS anchor,
actedIn,
m AS movie,
{
gKey: m.title,
actors: collect(DISTINCT p2{.*}),
directors: collect(DISTINCT d{.*}),
nested: { example: "data" }
} AS staff
RETURN
anchor,
collect(actedIn) AS actingRels,
collect(movie) AS movies,
collect(staff) AS staff,
{ gkey: anchor.name, feels: "so many"} AS feels,
1 AS surprise,
{ one: "two", three: "four" } AS dictionary,
{ one: 1, two: 2.0, three: "four" } as objectionableDictionary
Returned data for anchor
node:
{
"identity": 1,
"labels": [
"Person"
],
"properties": {
"born": 1964,
"name": null
},
"elementId": "4:56b3fd1b-6973-453f-9e00-0a833fb1fb1a:1"
}
Expected:
{
"identity": 1,
"labels": [
"Person"
],
"properties": {
"born": 1964,
"name": "Keanu Reeves"
},
"elementId": "4:56b3fd1b-6973-453f-9e00-0a833fb1fb1a:1"
}
Not sure if this is intentional. All other return values are as expected. Running on neo4j:5-enterprise