feat: join field with polymorphic relationships (#9990)
### What? The join field had a limitation imposed that prevents it from targeting polymorphic relationship fields. With this change we can support any relationship fields. ### Why? Improves the functionality of join field. ### How? Extended the database adapters and removed the config sanitization that would throw an error when polymorphic relationships were used. Fixes #
This commit is contained in:
@@ -115,6 +115,30 @@ export const Categories: CollectionConfig = {
|
||||
collection: 'posts',
|
||||
on: 'blocks.category',
|
||||
},
|
||||
{
|
||||
name: 'polymorphic',
|
||||
type: 'join',
|
||||
collection: postsSlug,
|
||||
on: 'polymorphic',
|
||||
},
|
||||
{
|
||||
name: 'polymorphics',
|
||||
type: 'join',
|
||||
collection: postsSlug,
|
||||
on: 'polymorphics',
|
||||
},
|
||||
{
|
||||
name: 'localizedPolymorphic',
|
||||
type: 'join',
|
||||
collection: postsSlug,
|
||||
on: 'localizedPolymorphic',
|
||||
},
|
||||
{
|
||||
name: 'localizedPolymorphics',
|
||||
type: 'join',
|
||||
collection: postsSlug,
|
||||
on: 'localizedPolymorphics',
|
||||
},
|
||||
{
|
||||
name: 'singulars',
|
||||
type: 'join',
|
||||
|
||||
Reference in New Issue
Block a user