Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apoc.convert.toTree include/exclude not working with multiple node labels #3997

Open
diogohartuiqdebarba opened this issue Mar 8, 2024 · 0 comments
Labels
core-functionality Adding new procedure, function or signature to APOC core

Comments

@diogohartuiqdebarba
Copy link

I need to remove the "born" in the toTree result, but when there is more than one label like Person:AnotherLabel, this does not work, and the result continues with "born" prop.

apoc.convert.toTree documentation

Expected Behavior

Return without "born" prop in the result.

Actual Behavior

Return the "born" prop in the result.

How to Reproduce the Problem

CREATE (p1:Person:AnotherLabel {name:'p1', born: 1980})
CREATE (p2:Person:AnotherLabel {name:'p2', born: 1990})
CREATE (p3:Person:AnotherLabel {name:'p3', born: 2010})
CREATE (p2)-[:SON]->(p1)
CREATE (p3)-[:SON]->(p2)

image

MATCH path = (root)-[:SON*0..]->(p:Person)
WITH COLLECT(path) AS paths
CALL apoc.convert.toTree(paths, true, { nodes: { Person: ['-born'] } }) YIELD value
RETURN value AS people 

Versions

  • OS: Windows
  • Neo4j Browser version: 5.11.0
  • Neo4j Server version: 5.12.0 (enterprise)
  • Neo4j Browser Changelog
  • Build number: 219
  • Build date: 01/08/2023
  • Neo4j-Apoc: apoc-5.10.1-core.jar
@jexp jexp moved this to Todo in APOC Extended Larus Mar 22, 2024
@vga91 vga91 moved this from Todo to Core issues (with trello core card) in APOC Extended Larus Apr 10, 2024
@vga91 vga91 added the core-functionality Adding new procedure, function or signature to APOC core label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-functionality Adding new procedure, function or signature to APOC core
Projects
Status: Core issues
Development

No branches or pull requests

2 participants