I have some problems with the key path to my identifier.
All data converted to json with: JsonConvert.SerializeObject
Store
{"DbVersion":null,"Name":"People","PrimaryKey":{"Name":"Id","KeyPath":"Id","Unique":false,"Auto":true},"Indexes":[{"Name":"FirstName","KeyPath":"FirstName","Unique":false,"Auto":false},{"Name":"LastName","KeyPath":"LastName","Unique":false,"Auto":false}]}
Model
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
Will store
{id: 0, firstName: "a", lastName: "b", Id: 6}
And will resolve (getAll) object
{"Id":0,"FirstName":"a","LastName":"b"}
Am I doing something wrong, any clues?
C# Code to set PK
schema.PrimaryKey = new IndexSpec { Name = "Id", KeyPath = "Id", Auto = true };
Hello,
I have some problems with the key path to my identifier. All data converted to json with: JsonConvert.SerializeObject
Store
{"DbVersion":null,"Name":"People","PrimaryKey":{"Name":"Id","KeyPath":"Id","Unique":false,"Auto":true},"Indexes":[{"Name":"FirstName","KeyPath":"FirstName","Unique":false,"Auto":false},{"Name":"LastName","KeyPath":"LastName","Unique":false,"Auto":false}]}
Model
Will store
{id: 0, firstName: "a", lastName: "b", Id: 6}
And will resolve (getAll) object
{"Id":0,"FirstName":"a","LastName":"b"}
Am I doing something wrong, any clues?
C# Code to set PK
schema.PrimaryKey = new IndexSpec { Name = "Id", KeyPath = "Id", Auto = true };