Toggling Autonumber property after creating an Entity without Identifier field

Toggling Autonumber property after creating an Entity without Identifier field

  
Hello again,

Performing the following steps generates an Internal Error in Service Studio:
   1. Create a new Entity
   2. Delete Id attribute
     
   3. Publish eSpace
   4. Add a new Id attribute
   5. Set it as autonumber
     
   6. Publish eSpace

The final eSpace is in attach as well as the error Generic SQL Error. Cannot update identity column 'ID'.

Why does the platform try to update the Identifier attribute in step 6, knowing it is set as Autonumber?
(from the attached error stack...)
   ...
   UPDATE [SISIPASGO].DBO.[OSUSR_966_ENTITYX] SET [ID]=0

   ...
Hi Pedro,

I don't have an answer to your question, but why are you posting questions to this forum when you are, according to your profile, OutSystems staff?
Hi Killian,

Though I am OutSystems staff, I too have questions :) Furthermore, Community members would certainly benefit from these, I hope, as anyone else developing with the platform and looking for answers.

Cheers!
Hi Pedro,

I understand. I just thought you'd have secret backchannels to gain information :).
When possible, please do it ;)

Cheers!
The platform doen't support adding an identity column to an existing table. If you need to do that, you'll have to force the platform to create a new table, by cutting + pasting the entity, or by dropping the existing table via the database's management tool.

Why is that not supported? Like, most things that aren't, it probably was considered an edge use case.
Sounds plausible, João. Indeed, in our scenario, we were mapping legacy tables to the Platform's local data model. So instead of recreating all the entities one-by-one, a quick option was to first map them through Integration Studio, then copy-pasting them into local entities through Service Studio. Since a first publish was performed before setting up the right Identifiers we came across this issue. On the second project we're already doing it the right way to avoid this.