When binding to an external datasource you are never likely to have object properties called ‘key’ and ‘parent’.
Is it possible to tell the go model to use different fields (e.g. ‘employeeId’ and ‘managerId’) for ‘key’ and ‘parent’ properties?
At the moment I have to create a new model from my service model e.g.
{
“EmployeeId”: 1,
“KnownAs”: “Jim”,
“ManagerId”: 0
},{
“EmployeeId”: 26,
“KnownAs”: “Andrew”,
“ManagerId”: 1
}
has to become
{
“key”: 1,
“KnownAs”: “Jim”,
“parent”: 0
},
{
“key”: 26,
“KnownAs”: “Andrew”,
“parent”: 1
}
Not the end of the world but it would be better if GoJS handled this by being able to point alternative fields to the key/parent fields rather than having to code around this for both the GET and the POST.
Thanks