#allowIDOnCreate with plugin-import-export

2 messages · Page 1 of 1 (latest)

rocky heron
#

Hello, I'm looking to achieve the following workflow:

  • create entities with relationships (e.g. a post with tags)
  • export tags from a test application and import to production using plugin-import-export
  • keep the IDs of the tags consistent after export, so I can also import posts with a tag relationship

It seems like allowIDOnCreate is ideal for this, but as far as I can tell the import-export plugin still only supports preserving custom IDs - https://github.com/payloadcms/payload/blob/main/packages/plugin-import-export/src/import/batchProcessor.ts#L193
I would like to keep my IDs using out-of-the-box functionality if possible.

Has anyone used import-export in a way to preserve relationships? Is there a way around this? Thanks.

GitHub

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for buildi...

cold arrowBOT