ids for this class must be manually assigned before calling save():

Certified Senior Developer

Hi. 

On write to datastore for overwriting an EXISTING record I am getting the following error.

 ids for this class must be manually assigned before calling save():

I see plenty of posts saying enable autogeneration, but don't feel this is appropriate given no autogeneration should be occurring on this entry and it already has a primary key filled in.

If such a thing did work after enabling autogeneration, it seems to me that would mean something is going wrong and a completely new Entity is being saved.

Am I wrong in this understanding?

  Discussion posts and replies are publicly visible

Parents
  • Note with autogeneration enabled, a new record is only written if you pass a blank primary key with your record to the Write to DS service - in this case, a new row is added and an ID is automatically generated.  When you save this back to your CDT in the Data Outputs, following writes will pass the row with the unique ID populated, which will cause the Write to DS service to act as an UPDATE, instead of an INSERT.

Reply
  • Note with autogeneration enabled, a new record is only written if you pass a blank primary key with your record to the Write to DS service - in this case, a new row is added and an ID is automatically generated.  When you save this back to your CDT in the Data Outputs, following writes will pass the row with the unique ID populated, which will cause the Write to DS service to act as an UPDATE, instead of an INSERT.

Children
No Data