I'm trying to save a list of custom objects with sqlalchemy:
session.bulk_save_objects(listOfObjects)
And obtaining IntegrityError:
psycopg2.IntegrityError: duplicate key value violates unique constraint "ppoi_ukey"
And:
Key ("id")=(42555) already exists.
Is there any way to get the key Id (42555)
as an integer, in order to roll back, extract this key from the list, and re insert the list again without it?