[Bug found] Cannot remove identifier from entity

Found in 9.1 and 10.0

- Create new espace

- Create an entity with some attributes. (doesn't matter what, just add some)

- Publish espace

- Remove the Id from the entity

- Publish again...

Database Upgrade Error
Could not create / change primary key in 'OSUSR_Q3P_FIRSTWITHID' table. Inconsistent database table and entity primary key definitions.

This is very strange, especially there is nothing to complain about.

Hi J.

This looks like a bug, indeed. I've added this to our maintenance backlog and we will prioritise it's solution.

Thank you for reporting it.

Best Regards,


Hi J,

After some further analysis, I must say that this is not a bug. In fact, it is the default behaviour, as you can see in this help entry

Best regards,

I disagree, because I simply want to drop the id.

However it won't allow it because I have an index on it.

that's a bit catch-22, because I want to drop it.

Worse part of that, we used to had access to the index, but since it's auto-genrated it's not accessible anymore.

The help-file you provide is covering only one thing that the attribute has constraints on it.

and imho, the index alone isn't sufficient.

That said, how to delete the id then?

I have a table with many items already, but the Id is useless, so useless because I have active creates/deletes on it, so the autonumber is skyrocketing.

Hi J,

I agree with you that this specific case might look somehow weirder, since the only constraint on the table is the index and it is not a foreign key to any other table. However, the restriction is the same as if the constraint was some other. 

In order to delete the ID column, you need to do so directly on the database, deleting the index as well, then delete it in your module and publish the module again.

Best regards,