Error adding a field to a table - Duplicate entry '-1' for key 'PRIMARY'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 04:57 AM
I'm trying to add a field to an existing table and I'm getting the error:
INSERT INTO sys_metadata
...
java.sql.BatchUpdateException: Duplicate entry '-1' for key 'PRIMARY'
The full error indicates that the value '-1' is being inserted (or trying) into the 'sys_id' field and this is breaching the primary key. From what I've read, the '-1' value is supposed to cause a new value to be assigned but that's clearly not happening in this case.
Can anyone advise what's occurring and, more importantly, how to fix it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 05:19 AM
Hello Peter,
Please check below link it may help you out.
Regards,
Geetanjali Khyale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 07:09 AM
Thanks but nothing in there managed to help.