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)?
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
1 Like