Property with multiple data types #3116
Unanswered
vishnuamritanshuis
asked this question in
Q&A
Replies: 1 comment
-
You can use
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Janusgraph 0.6.1 in one of application.
I am facing an issue, while adding adding vertex with same properties key but with diff datatypes.
I have a requirement where we need to provide the flexibility to let users add different datatypes with same property keys.
Please check below details where I have replicated the same issue from gremlin console client.
gremlin> JanusGraph.version()
==>0.6.1
gremlin> graph = JanusGraphFactory.open('inmemory')
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin> g.addV("Vabc").property("Vprop", 9).iterate()
gremlin> g.tx().commit()
==>null
gremlin> g.addV("Sabc").property("Vprop", "this is a string").iterate()
Value [this is a string value] is not an instance of the expected data type for property key [Vprop] and cannot be converted. Expected: class java.lang.Integer, found: class java.lang.String.
Is there any specific configuration/settings at Janus graph to fix the same or any other workaround?
Thanks,
Vishnu Amritanshu
Beta Was this translation helpful? Give feedback.
All reactions