Overview
You might see the following kind of error when modifying external object type in M-Files Admin:
Error: Object marked to be available offline (The statement has been terminated. (ERROR: 3621, SQLSTATE: 01000)
Violation of PRIMARY KEY constraint 'PK_OBJECTTYPECOLUMNMAPPING'. Cannot insert duplicate key in object 'dbo.OBJECTTYPECOLUMNMAPPING'. The duplicate key value is (162, 2). (ERROR: 2627, SQLSTATE: 23000)
Solution
Error happens if some column is defined twice in the select statement:
select column1, column2, column3, column2 from test_table
To solve the issue, please remove the duplicate column.
