I have a vertex with following properties:
Name - Type - Cardinality
prop_1 - String - Single
prop_2 - String - Set
When I return the value-map of above vertex, the values are not returned in proper format.
- Using valueMap().by(unfold()) returns prop_1 correctly as single String value but only returns the first element of prop_2 which is Set of String.
- Using simply valueMap() returns prop_1 as array of String and all values of prop_2 as array of String
I know that if I explicitly mention single cardinality properties to be unfolded,I can get the result I want but the gremlin query we are using is generic (dynamically generated) is used for different vertices with different properties and this the properties cannot be explicitly mentioned in return statements.
Is there a way to return the single and set carinality properties to be returned with correct data type representation?