payloadcms / payloadcms/payload
plugin-import-export is not able to import its own exported collections with 1:N relationship
Open
@nathanlentz is already working on this.
Since Jul 23, 2026.
plugin: import-export
v3
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
I created a "Campaign" slug with these field:
fields: [
{
name: 'name',
type: 'text',
required: true,
},
{
name: 'description',
type: 'text',
required: true,
},
{
name: 'events',
type: 'relationship',
relationTo: 'event',
hasMany: true,
},
],
As it is seen in the image, the generated event_# columns are ignored when importing, and the resulting events columns is empty.
Link to the code that reproduces this issue
https://github.com/pinuts-SebastianGolbert/payload-import-issue
Reproduction Steps
Export campaigns
Try to import campaigns
This can be reproduced more faithfully by using different sqlLite dbs in the .env file (one for export, one for import), but it can also be done with the preview function.
Which area(s) are affected?
plugin: import-export
Environment Info
Binaries:
Node: 22.22.2
npm: 10.9.7
Yarn: 1.22.22
pnpm: 10.34.3
Relevant Packages:
payload: 3.85.1
next: 16.2.6
@payloadcms/db-sqlite: 3.85.1
@payloadcms/drizzle: 3.85.1
@payloadcms/graphql: 3.85.1
@payloadcms/next/utilities: 3.85.1
@payloadcms/plugin-import-export: 3.85.1
@payloadcms/richtext-lexical: 3.85.1
@payloadcms/translations: 3.85.1
@payloadcms/ui/shared: 3.85.1
react: 19.2.6
react-dom: 19.2.6
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.5.0: Mon Apr 27 20:38:56 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.