fix(drizzle): hasMany / poly relationships nested to localized fields / nested blocks to localized fields (#8456)

fixes https://github.com/payloadcms/payload/issues/8455 and
https://github.com/payloadcms/payload/issues/8462

- Builds the `_locale` column for the `_rels` when it's inside of a
localized group / tab
- Properly builds `sanitizedPath` for blocks in the transform-read
function when it's inside of a localized field. This fixes with fields
inside that have its own table (like `_rels`, select `hasMany: true`
etc)

Adds _more_ tests!
This commit is contained in:
Sasha
2024-09-28 17:33:50 +03:00
committed by GitHub
parent fb603448d8
commit 613d3b090e
9 changed files with 677 additions and 6 deletions

View File

@@ -971,6 +971,23 @@ export interface GroupField {
localizedGroupRel?: {
email?: (string | null) | EmailField;
};
localizedGroupManyRel?: {
email?: (string | EmailField)[] | null;
};
localizedGroupPolyRel?: {
email?: {
relationTo: 'email-fields';
value: string | EmailField;
} | null;
};
localizedGroupPolyHasManyRel?: {
email?:
| {
relationTo: 'email-fields';
value: string | EmailField;
}[]
| null;
};
updatedAt: string;
createdAt: string;
}