You are not logged in.
Pages: 1
It seems to me, TSQLRestClient is lacking such method as
function TSQLRestClient.Update(Value: TSQLRecord; ID: integer): boolean; override;
Sometimes it is necessary to update the ID for the record, and this method would be useful.
Offline
From the ground up, the ID of a record is supplied by the framework, in fact by the underneath DB layer.
Some features (like caching or DB integrity) relies on it.
Updating an ID is something which is not implemented yet - but it is on purpose.
For instance, in a Domain Driven architecture, AFAIK the ID of an Entity object is unique, and identifies it.
In short, ID attribution is part of the low-level object management and DB layer, not part of the business layer.
From the RESTful point of view, I did not see any way of updating an ID for an existing item.
How would be the URI layered, in this case?
Why do you want to "update" the ID?
You should better create a new object with a new ID, then use it.
Offline
Updating ID ( primary key) from client app - it seems like architecture problem. Updating ID usually need some additional steps like: lock tables; disable constraints; change ID; change value of fields what foreign key on this ID; check integrity; enable constraints; The best way is not to update primary key.
Offline
ab, mpv, you are absolutely right. I wanted to save by using the field ID, but as I understand it better and more correct to add a new field. Thank you.
Offline
Pages: 1