Skip to content
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

Cosmos: Don't map collections as owned types #25827

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Conversation

AndriySvyryd
Copy link
Member

Reenable test for #24684

Fixes #25749
Fixes #24684

@AndriySvyryd AndriySvyryd requested a review from a team September 1, 2021 19:00
@@ -40,6 +40,6 @@ public CosmosRelationshipDiscoveryConvention(ProviderConventionSetBuilderDepende
/// <param name="model"> The model. </param>
/// <returns> <see langword="true"/> if the given entity type should be owned. </returns>
public static bool ShouldBeOwnedType(Type targetType, IConventionModel model)
=> !targetType.IsGenericType || targetType.GetGenericTypeDefinition() != typeof(List<>);
=> !targetType.IsGenericType || targetType.GetInterface("IEnumerable`1") == null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"string", really?

Copy link
Member Author

@AndriySvyryd AndriySvyryd Sep 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can use GetInterface(typeof(IEnumerable<>).Name), but there's no Type overload for some reason

Reenable test for 24684

Fixes #25749
Fixes #24684
@AndriySvyryd AndriySvyryd merged commit 538dab2 into release/6.0 Sep 1, 2021
@AndriySvyryd AndriySvyryd deleted the Issue25749 branch September 1, 2021 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants