fix: deep querying, handle getLocalizedPaths for blocks (#10187)
Fixes https://github.com/payloadcms/payload/issues/10126
Properly handles the `getLocalizedPaths` function for blocks.
Previously, using collection with this config:
```
{
slug: 'deep-nested',
fields: [
{
type: 'tabs',
tabs: [
{
name: 'content',
fields: [
{
type: 'blocks',
name: 'blocks',
blocks: [
{
slug: 'testBlock',
fields: [
{
type: 'tabs',
tabs: [
{
name: 'meta',
fields: [
{
type: 'relationship',
relationTo: 'movies',
name: 'movie',
},
],
},
],
},
],
},
],
},
],
},
],
},
],
},
```
The following query didn't work in MongoDB:
```ts
const result = await payload.find({
collection: 'deep-nested',
where: {
'content.blocks.meta.movie': {
equals: movie.id,
},
},
})
```