Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-24-2022 11:46 AM
Hi, I'm looking at creating nodes + relationships using apoc.graph.fromDocument
but am having trouble figuring out how to specify properties for relationships. For example, how would one specify the "roles:Forrest" property of the ACTED_IN relationship? Any help much appreciated! Thanks!!
CREATE (a:Actor {name:'Tom Hanks'})-[r:ACTED_IN {roles:'Forrest'}]->(m:Movie {title:'Forrest Gump'})
RETURN *
Something like the following but not sure how to incorporate the 'roles' bit...
{
"id": 1,
"type": "Actor",
"name": "Tom Hanks",
"actedIn": [
{
"type": "movies",
"id": 1,
"title": "Forrest Gump"
}
]
}
03-04-2022 06:26 AM
It seems that currently the procedure doesn't provide this feature.
It's possible put in the configuration parameter a mapping
to filter/customize nodes, and a relMapping
to change the default relationship type.
Maybe this relMapping
could be improved, it could support a map instead of a string to pick property to put into the relationship, or something like that.
I suggest you to open a GitHub feature issue here to track this.
All the sessions of the conference are now available online