neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
939 stars 231 forks source link

building map properties #646

Closed MatthewCorney closed 11 months ago

MatthewCorney commented 1 year ago

Is there a way to build map properties? I see there is the option to load json strings but we would quite like to be able to use map k,v pairs in cypher directly

https://neo4j.com/docs/cypher-manual/current/syntax/values/

"Map, a heterogeneous, unordered collection of (Key, Value) pairs. Key is a String Value has any property, structural or composite type"

Thanks!

mariusconjeaud commented 1 year ago

I am unsure what you mean here, because maps are only a Cypher construct, not a property type for nodes or relationships : https://neo4j.com/docs/cypher-manual/current/values-and-types/maps/

So I guess you want to be able to have the internal generated Cypher to contain maps (to avoid doing db.cypher_query(my_own_query), so could you explain a bit more ? For what purpose and how would you see it ?