Closed mad closed 5 years ago
Hello @mad,
root issue here is that in Cypher for Gremlin collections in properties are supported only in in-memory TinkerGraph implementation (see CreateTest#createListProperty for more straightforward example).
Properties with "set" and "list" cardinality in Gremlin, and composite types in Cypher are different things, and we were unable to find how to correctly map this functionality.
Assuming you are using JanusGraph, implementation of collections in properties for TinkerGraph will not address you requirement, right?
Hello @dwitry
Two way to support collections data in JanusGraph implementation
First, add custom serializer/deserializer for ArrayList type (https://docs.janusgraph.org/latest/serializer.html) I think, this is to close to Cypher composite types implementation
Second, create property with list/set cardinality (https://docs.janusgraph.org/latest/schema.html#property-cardinality). This way required translate any set/read operation to correct gremlin property(cardinality,...)/properties
First way it is enough for me
May be add TranslatorFeature.SERIALIZED_COLLECTIONS and after that cypher translator, set any collection as is?
Hello @mad,
thank you for suggestions.
We have not implemented 'list'/'set' cardinality because there's no way known to us to distinguish between single value and list with a single value.
ArrayListSerializer potentially could address this requirement, unfortunately don't have time to look into this right now.
Setting label enhancement
, might look into it later to improve compatibility with JanusGraph.
Resolved by #267
Example query and exception
Modified test