You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it intentional, that case classes must be defined at top level and cannot be inside other scope?
Works:
classCaseClassSpecextendsFlatSpecwithMatchers {
@label("example")
caseclassExample(@id id: Option[Int],
longValue: Long,
stringValue: Option[String])
"Gremlin" should "be able to Marshall case-classes" in {
valgraph=TinkerGraph.open.asScala
valexample=Example(None, Long.MaxValue, Some("optional value"))
valv= graph + example
v.toCC[Example] // equal to `example`, but with id set// find all vertices with the label of the case class `Example`
graph.V.hasLabel[Example]
// modify the vertex like a case class
v.updateAs[Example](_.copy(longValue =0L))
}
}
Does not work:
classCaseClassSpecextendsFlatSpecwithMatchers {
"Gremlin" should "be able to Marshall case-classes" in {
@label("example")
caseclassExample(@id id: Option[Int],
longValue: Long,
stringValue: Option[String])
valgraph=TinkerGraph.open.asScala
valexample=Example(None, Long.MaxValue, Some("optional value"))
valv= graph + example
v.toCC[Example] // equal to `example`, but with id set// find all vertices with the label of the case class `Example`
graph.V.hasLabel[Example]
// modify the vertex like a case class
v.updateAs[Example](_.copy(longValue =0L))
}
}
Error:
Error:(19, 19) not found: value <none>
val v = graph + example
It's not a requirement to work, but maybe the error could be a bit cleaner, or stated in the readme...
The text was updated successfully, but these errors were encountered:
Is it intentional, that case classes must be defined at top level and cannot be inside other scope?
Works:
Does not work:
Error:
It's not a requirement to work, but maybe the error could be a bit cleaner, or stated in the readme...
The text was updated successfully, but these errors were encountered: