Skip to content

Nested Saves #10812

Open
Open
@tobiasiv

Description

@tobiasiv

Describe the Bug

An error occurs when attempting to save the parent document after saving a child document.

Link to the code that reproduces this issue

https://github.com/tobiasiv/payload-reproduction/tree/nested-saves

Reproduction Steps

  1. Clone the reproduction repo (branch: nested-saves)
  2. Set the env variables
  3. pnpm dev
  4. Go to collection Pages
  5. Open Page 1
  6. Open Post 1 via drawer
  7. Change title to "Post 2"
  8. Save the post
  9. Change title of Page 1 to "Page 2"
  10. Save the page
  11. This error appears: This relationship field has the following invalid relationships: [object Object] 0

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Binaries:
  Node: 22.13.0
  npm: N/A
  Yarn: N/A
  pnpm: 9.7.0
Relevant Packages:
  payload: 3.19.0
  next: 15.1.5
  @payloadcms/db-postgres: 3.19.0
  @payloadcms/email-nodemailer: 3.19.0
  @payloadcms/graphql: 3.19.0
  @payloadcms/next/utilities: 3.19.0
  @payloadcms/payload-cloud: 3.19.0
  @payloadcms/richtext-lexical: 3.19.0
  @payloadcms/ui/shared: 3.19.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 16263
  Available CPU cores: 8

Metadata

Metadata

Assignees

Labels

area: uiRelated to the admin panel.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions