diffsync icon indicating copy to clipboard operation
diffsync copied to clipboard

non id non attribute fields are not available during creation

Open retnuh opened this issue 1 year ago • 1 comments

Environment

  • DiffSync version: latest - 1.10.0

Observed Behaviour

Diffsync doesn't pass along fields that are not ids or attributes during creation.

Expected Behaviour

There should be a mechanism to access those types of fields during create. An example use case would be creating a new object with a default name from source A, but in general source A doesn't know or care about the name and it's not usually part of the diffsync.

retnuh avatar Jan 19 '24 12:01 retnuh

I would also like to have this implemented. Lots of datasets i use proved a Primary key that is only locally significant, but is required to make a patch request.

I see in the example that they added a database_pk which is optional, but they never use the value it is assigned.

The only way to lookup this value is in the DiffSync class in the datastore: self.store._data['modelname']['id'].database_pk

Yoyasp avatar Feb 01 '24 13:02 Yoyasp