Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-01-2022 03:56 AM
I'm learning about Virtual Objects in Neo4j.
I'd like to know if there is any possibility to store that Virtual Objects (turn them into regular objects)?
Solved! Go to Solution.
03-03-2022 07:21 AM
One way is to use the
You could use the apoc.create.node
and/or apoc.create.relationship
procedures
using the apoc.node.labels
and apoc.any.properties
functions, because "classic" neo4j statement like labels(n)
and properties(n)` doesn't work with virtual entities. Or the apoc.rel.type in case of relationship.
For example:
CALL apoc.create.vNode(['MyLabel'], {prop1: 'myValue'}) // virtual node entity
YIELD node as virtual
CALL apoc.create.node(apoc.node.labels(virtual), apoc.any.properties(virtual)) // convert to real using apoc.node.labels and apoc.any.properties
yield node as real
return real
03-03-2022 07:21 AM
One way is to use the
You could use the apoc.create.node
and/or apoc.create.relationship
procedures
using the apoc.node.labels
and apoc.any.properties
functions, because "classic" neo4j statement like labels(n)
and properties(n)` doesn't work with virtual entities. Or the apoc.rel.type in case of relationship.
For example:
CALL apoc.create.vNode(['MyLabel'], {prop1: 'myValue'}) // virtual node entity
YIELD node as virtual
CALL apoc.create.node(apoc.node.labels(virtual), apoc.any.properties(virtual)) // convert to real using apoc.node.labels and apoc.any.properties
yield node as real
return real
All the sessions of the conference are now available online