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

StackOverflowException in dotnet.exe when creating migrations with one-to-one relationship configured incorrectly #6017

Closed
rowanmiller opened this issue Jul 7, 2016 · 1 comment
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

@rowanmiller
Copy link
Contributor

When configuring my models using the following setup (simplified):

public class Independent {

    [Key]
    public int ID { get; set; }

    [ForeignKey("ID")]
    public virtual Dependent Dependent { get; set; }
}

public class Dependent {

    [Key]
    public int ID { get; set; }

    [ForeignKey("ID")]
    public Independent Independent { get; set; }
}

and running Add-Migration, rather than giving a warning regarding ambiguity in which side is dependent, dotnet throws an exception:

Unhandled exception at 0x00007FFF798C97DE (coreclr.dll) in dotnet.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000AC03A75FF8).

@smitpatel
Copy link
Contributor

Infinite flipping of sides in ForeignKeyAttributeConvention

@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 12, 2016
@AndriySvyryd AndriySvyryd removed their assignment Jul 12, 2016
@ajcvickers ajcvickers modified the milestones: 1.1.0-preview1, 1.1.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

4 participants