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
Breaking change in 2.0.3 for override fields #1224
Comments
@KuanWenChen probably you can take a look, I understand that you were fixing something, but we also break some, so need to come up with some plan for all known cases to work |
I thing problem is happen at value is not a iterable type. I am not sure why value is not a iterable type. [existingRules, targetMetadataEntries].forEach((entries) => {
for (const [valueKey, value] of entries) {
const arrayValue = Array.isArray(value) ? value : [value];
if (mergeMap.has(valueKey)) {
mergeMap.get(valueKey)!.push(...arrayValue);
} else {
mergeMap.set(valueKey, arrayValue);
}
}
}); |
Could you create a PR for this issue? |
OK, I think I found the problem. |
Let's track this here #1225 |
Did you read the migration guide?
Is there an existing issue that is already proposing this?
Potential Commit/PR that introduced the regression
c65d434
Versions
2.0.0 -> 2.0.3
Describe the regression
sample entities hierarchy:
So we have an abstract class with an id that can be a number or string overriding it and exposing it. Using omit type to create DTO, that has just a name field.
Let's implement a simple test:
The error is handled over here
but thrown over here
this behavior recently changed, and it's a breaking change for this case at least.
I'm ok to fix it by myself, just some comments from maintainers on expected behavior will be good to hear
as for me we should apply the most closest decorators or probably merge it somehow, but not sure is it that obvious to do the merge or no
Minimum reproduction code
No response
Input code
provided
Expected behavior
need suggestion
Other
No response
The text was updated successfully, but these errors were encountered: