Hello
I have a collection with an array of objects. One of the fields in this array is a relation to another collection. This works fine locally but when I deploy the language relationship doesn't properly save, it always reverts back to the empty select box with "Select a value".
I can see the value being updated in the database though, if I look in the subjects_rel table I see the following:
| id | order | parent_id | path | task_languages_id
| 14 | | SVE | word2Columns.0.language | fi
but it's not reflected in the payload UI or via the API
How can I begin troubleshooting this?
export const Subjects: CollectionConfig = {
slug: "subjects",
fields: [
// more fields
{
name: "word2Columns",
type: "array",
required: false,
fields: [
{
name: "type",
type: "select",
required: true,
options: [
{ label: "Ord", value: "word" },
{ label: "Bild", value: "image" },
],
},
{
name: "name",
type: "text",
localized: true,
},
{
name: "language",
type: "relationship",
relationTo: "task-languages",
hasMany: false,
required: true,
localized: true,
admin: {
condition: (_, siblingData) => siblingData.type === "word",
},
},
],
},
],
};