The setup (simplified)

public interface IHierarchical : IEntity
{
    [Field(Nullable = false)]
    Hierarchy Hierarchy { get; set; }
}
public interface IHierarchical<T> : IHierarchical where T : IHierarchical<T>
{
    [Field]
    T Parent { get; set; }
}

public class TestPerson : Entity, IHierarchical<TestPerson>
{
    public Hierarchy Hierarchy { get; set; }

    public TestPerson Parent { get; set; }
}

For this, I'll get 2 indexes for Parent field, which look like theese:

CREATE NONCLUSTERED INDEX [TestPerson_IHierarchical(TestPerson)_FK_Parent] ON [dbo].[TestPerson] 
(
    [Parent_Id] ASC
)
CREATE NONCLUSTERED INDEX [TestPerson_FK_Parent] ON [dbo].[TestPerson] 
(
    [Parent_Id] ASC
)

Obviously one of these indexes is redundant

asked May 05 '12 at 10:31

xumix's gravatar image

xumix
425757682


One Answer:

Thanks for the report. Bug is fixed now. It will be included in the next minor update for all versions.

answered May 12 '12 at 04:20

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov
179325

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA