-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use deriveLinkedEntries with many references field needs documentation. #127
Comments
Just noticed the "emailAddresses": {
"nl-NL": {
"sys": {
"type": "Link",
"linkType": "Entry",
"id": "the-derived-id"
}
}
} whereas I would expect: "emailAddresses": {
"nl-NL": [
{
"sys": {
"type": "Link",
"linkType": "Entry",
"id": "the-derived-id"
}
}
]
} |
Hi @lucasvanlierop,
|
we'll improve the tool in the future to detect field type and prevent this from happening. |
Thanks @Khaledgarbaya! I worked on it yesterday, and fixed some other small bugs as well. I now understand it's a multi step process. What I've done is:
This approach seems to work |
Fixes #127. Link derived entry based on the type of the reference field (either as first item in Array or single entry)
🎉 This issue has been resolved in version 0.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for working on this update! I noticed this same issue when working with the Contentful CLI. Will this update be applied to that repo as well? |
Hey @gkulasik-livongo we are working on some more improvement and we'll update the cli soon |
Expected Behavior
When converting a single field to a many references field, one entry should be created and linked
Actual Behavior
Migration plan looks successful:
Migration then fails:
Possible Solution
Create a variant of the derive entry example which shows how to use it with a many references field
Steps to Reproduce
run a migration similar to this:
Context
We want to allow multiple entries instead of just one and are therefore trying to convert an existing field to many references.
Environment
The text was updated successfully, but these errors were encountered: