Janusgraph vertex property with cardinality as SET type
Hi, need a working example of how a property can be added to a vertex with cardinality as SET type and how we can retrieve it and assign it to SET of strings in JAVA.
Please note: I have tried the janusgraph doc code, google search, chat GPT but every time I put something in that property through java code it get stored in STRING format only.
Ex: "["ABC"]" --> current , ["ABC"] --> this I need.
Please help.
Solution:Jump to solution
for JanusGraph you'd want to set up the schema for your multiproperty:
```
mgmt = graph.openManagement()
mgmt.makePropertyKey('p').dataType(String.class).cardinality(Cardinality.SET).make()
mgmt.commit()...
2 Replies
Solution
for JanusGraph you'd want to set up the schema for your multiproperty:
then for Gremlin it should just be
Thanks a ton. It got worked.👍