I started using environments in Builder–it’s great! But there’s a small problem when using references.
When you set a reference as a content input, you can restrict the content items to a particular model. Doing so sets the modelId
field in the content item JSON:
{
"@type": "@builder.io/core:Field",
"name": "author",
"type": "reference",
"modelId": "475f4f8ac9ea4afb9c5991be7a18781c",
...
}
Once you switch environments, however, the model-based validation no longer works because your old model id has been prefixed with the environment key. You can set the model again, like so:
{
"@type": "@builder.io/core:Field",
"name": "author",
"type": "reference",
"modelId": "9e1c9500f106432dbfa7f5743e4868e1_475f4f8ac9ea4afb9c5991be7a18781c",
...
}
but then the validation is broken in other environments.
Is there a way around this bug and will it be fixed soon?