Skip to content

Annotations on the first owned entity type reference are lost #10911

@ghost

Description

I discovered an odd regression that has occurred between build 28148 and 300047. I will have to spend some time tracking down when it occurred, I will try to do that tomorrow.

The issue is that my model has sub-owned types and suddenly the migration would stop generating correctly. I have tracked it down to two issues in the ModelSnapshot code, below is a Gist of a sample snapshot.

https://gist.github.com/mrswain/f975e4a2538eaea8d9b06d26d961cecc

The end result of the model should be 4 entities and 7 owned entities, and all entities should be mapped to 4 schema.table pairs.

What happens is I now get 6 entities (two owned ones become unowned) and some of the owned entities lose their table relational attributes.

I dropped the test back to build 28148 and it gives the correct output so some change has caused this.

NOTE:
My test program is a simple

using System;

namespace EFTest
{
    class Program
    {
        static void Main(string[] args)
        {
            var snapshot = new SnapshotTest();

            var model = snapshot.Model;

        }
    }
}

I have a breakpoint on the model assignment so I can view the results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions