payloadcms / payload

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
https://payloadcms.com
MIT License
21.04k stars 1.27k forks source link

Adding an ID into the data object on a "create" operation does not respect the ID inputted #6884

Open mcornielje090404 opened 1 week ago

mcornielje090404 commented 1 week ago

Link to reproduction

No response

Payload Version

3.0.0-beta.53

Node Version

20.13.1

Next.js Version

15.0.0-canary.37

Describe the Bug

When running a "create" or "update" operation with the payload client using the Postgres adaptor and uuid's there is an option to input an "id" but when inputting an "id" it is overwritten before the record is inserted/updated in the DB.

I believe to have found a possible solution and more details about the issue and why I believe we should be able to input our own ID's can be found in a discussion I previously raised (https://github.com/payloadcms/payload/discussions/6836).

Reproduction Steps

Adapters and Plugins

db-postgres