The Config table has an integer primary key, which unfortunately doesn't work with the Ambry database model because all of the records for a dataset can be stored in a bundle, and then loaded into another library, with the likely result that the integer primary keys from two bundles will conflict.
This is why nearly all of the other tables have vid keys or compound keys.
Alter the config table to use a primary key that is only unique within a dataset.
One possibility: make it a compound primary key, with the d_vid being the other part of the key. This should only require the change of using d_vid along with id when looking for parent records.
Use next_sequence_id() and identity.GeneralNumber1 with a type code of ‘F’ to populate id field. See orm.dataset.Dataset.new_source() for an example of using the two together.
The Config table has an integer primary key, which unfortunately doesn't work with the Ambry database model because all of the records for a dataset can be stored in a bundle, and then loaded into another library, with the likely result that the integer primary keys from two bundles will conflict.
This is why nearly all of the other tables have vid keys or compound keys.
Alter the config table to use a primary key that is only unique within a dataset.
One possibility: make it a compound primary key, with the d_vid being the other part of the key. This should only require the change of using d_vid along with id when looking for parent records.