I'm currently trying to unwind a list of TravelEdges that has a "DateTime?" but I keep receiving the following error:
{"CypherTypeException: Type mismatch: expected a map but was String(\"2018-05-21T08:38:00\")"}
I'm currently using the latest version of neo4j (3.4.8) and was wondering if someone could assist?
Also, is there a more efficient way of adding the edges without having two matches? The Id's are unique.
List<TravelEdge> travelpoints = new List<TravelEdge>();
//Add stuff to list
graphClient.Cypher
.Unwind(travelpoints, "sc")
.Match("(s1:Node { Id: sc.Id1})")
.Match("(s2:Node { Id: sc.Id2})")
.Merge("(s1)-[t:Travels_To]->(s2)")
.OnCreate()
.Set("t.Time = sc.TravelTime")
.ExecuteWithoutResults();
public class Node{
//Unique
public long Id {get;set;}
}
public class Edge {
public DateTime? TravelTime {get;set;}
}
public class TravelEdge{
public long Id1 {get;set;}
public long Id2 {get;set;}
public DateTime? TravelTime {get;set;}
}