Open alekseibahmatov opened 7 months ago
Hey @alekseibahmatov you might want to check out the nested-docs plugin for payload https://payloadcms.com/docs/plugins/nested-docs. Might be a reasonable fit for your use case. Until the issue can be solved.
Link to reproduction
No response
Describe the Bug
Seems like found a bug in entity creation if collection is related to another entity in the same collection. I'm trying to create categories collection and of course there must be root categories and their children and this chain may be very long.
So I created localized collection where main fields are category_name(text field) and root_category(relationTo field). So when I create root category(that which root_category is empty) everything is ok. Now when I try to create category which root category is the previous category that I just created I get this error:
But the way to create such entity exists. First we need to create category without root_category and then in edit view assign root category.
Maybe issue in the localization, but I haven't tested this case.
To Reproduce
Collection I'm currently working on
Payload Version
2.11.1
Adapters and Plugins
db-postgres, bundler-webpack