ensure that the node id are unique in the cluster
This commit is contained in:
parent
715d581c8a
commit
c71ec890ca
|
@ -28,7 +28,7 @@ namespace Server.Models
|
|||
{
|
||||
Node node = new Node
|
||||
{
|
||||
id = patient.PersonID,
|
||||
id = patient.PersonID + patient.FirstName,
|
||||
label = patient.FirstName + " " + patient.LastName,
|
||||
};
|
||||
Nodes.Add(node);
|
||||
|
@ -38,7 +38,7 @@ namespace Server.Models
|
|||
{
|
||||
Node node = new Node
|
||||
{
|
||||
id = foodplace.FoodPlaceID,
|
||||
id = foodplace.FoodPlaceID + foodplace.Name,
|
||||
label = foodplace.Name + ", " + foodplace.City.Name + ", " + foodplace.City.Country.Name,
|
||||
};
|
||||
Nodes.Add(node);
|
||||
|
@ -53,8 +53,8 @@ namespace Server.Models
|
|||
{
|
||||
Edge edge = new Edge
|
||||
{
|
||||
from = relation.FoodPlaceID,
|
||||
to = relation.PatientID
|
||||
from = relation.FoodPlaceID + relation.FoodPlace.Name,
|
||||
to = relation.PatientID + relation.Patient.FirstName
|
||||
};
|
||||
Edges.Add(edge);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Server.Models
|
|||
{
|
||||
public class Edge
|
||||
{
|
||||
public int from { get; set; }
|
||||
public int to { get; set; }
|
||||
public string from { get; set; }
|
||||
public string to { get; set; }
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ namespace Server.Models
|
|||
{
|
||||
public class Node
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string id { get; set; }
|
||||
public string label { get; set; }
|
||||
public int cid { get; set; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue