Reputation: 1174
I am trying to create schema with the property keys defined for my keys used as properties in vertices and edges.
mgmt.makePropertyKey(ID_).dataType(classOf[String]).cardinality(Cardinality.SET).make()
mgmt.makePropertyKey("age").dataType(classOf[Integer]).cardinality(Cardinality.SET).make()
mgmt.makePropertyKey("size").dataType(classOf[Integer]).cardinality(Cardinality.SET).make()
mgmt.makePropertyKey("time").dataType(classOf[Long]).cardinality(Cardinality.SET).make()
age , size , time will be property keys in the edges.
Getting the below exception while creating keys,
java.lang.IllegalArgumentException: Not a supported data type: long
Time property key will be long value since i am current timemillsecs in that.
Same this works when i change to
mgmt.makePropertyKey("time").dataType(classOf[String]).cardinality(Cardinality.SET).make()
If i do that it is creating problem during graph traversal for time check. Getting some classcast exception. I couldnot give a long value to compare the time
Am i doing something wrong.
Upvotes: 0
Views: 74
Reputation: 1174
It works with java.lang.Long datatype
mgmt.makePropertyKey(TIME).dataType(classOf[java.lang.Long]).cardinality(Cardinality.SET).make()
Upvotes: 1