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 building powerful applications.
Join field breaks when put on a collection with versions. For example, Pages have a relation to Posts. Posts join to Pages. Both collections have versions. This error shows up [ Server ] Error: column pages_rels._posts_v_id does not exist
It could be that versions on both are required for the bug to present itself. Join works if the collection being joined TO (Pages in this example) has versions and Posts doesn't.
Describe the Bug
Join field breaks when put on a collection with versions. For example, Pages have a relation to Posts. Posts join to Pages. Both collections have versions. This error shows up
[ Server ] Error: column pages_rels._posts_v_id does not exist
It could be that versions on both are required for the bug to present itself. Join works if the collection being joined TO (Pages in this example) has versions and Posts doesn't.
Link to the code that reproduces this issue
https://github.com/alexanderbnelson/payload-example
Reproduction Steps
View the code for the posts collection config.
https://github.com/alexanderbnelson/payload-example/blob/main/src/collections/Posts/index.ts
Which area(s) are affected? (Select all that apply)
area: core
Environment Info