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

Setting EntityType.BaseType does not throw if Child property duplicates new parent property #1954

Closed
mikary opened this issue Mar 30, 2015 · 0 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@mikary
Copy link
Contributor

mikary commented Mar 30, 2015

The following test will fail to throw the expected exception:

        [Fact]
        public void Setting_base_type_throws_when_child_and_parent_contain_duplicate_property()
        {
            var model = new Model();

            var a = new EntityType(typeof(A), model);
            a.AddProperty("E", typeof(string));
            a.AddProperty("G", typeof(string));

            var b = new EntityType(typeof(B), model);

            var c = new EntityType(typeof(C), model);
            c.AddProperty("E", typeof(string));
            c.AddProperty("G", typeof(string));
            c.BaseType = b;

            Assert.Throws<InvalidOperationException>(() => b.BaseType = a);
        }

Property duplication checks currently propagate through an OnPropertyMetadataChanged event. Fixing this issue will probably require a different factoring.

@rowanmiller rowanmiller added this to the 7.0.0 milestone Apr 20, 2015
@mikary mikary closed this as completed May 12, 2015
@mikary mikary modified the milestones: 7.0.0-beta5, 7.0.0 May 12, 2015
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-beta5, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

3 participants