Example model:

public interface IHierarchy<T> : IEntity 
    where T : Entity
    T Parent { get; set; }

public class MyEntity : Entity, IHierarchy<MyEntity>
    [Field, Key]
    public int Id { get; private set; }

    [Field(Length = 100)]
    public string Text { get; set; }

    public MyEntity()
        : base()

    public MyEntity(Session session)
        : base(session)

    public MyEntity Parent { get; set; }

On property Parent there is no FK in database (MSSQL)

DO version:

asked May 10 '11 at 03:56

pil0t's gravatar image


Hello pil0t,

I'll check this. Haven't you noticed, whether this behavior is true only for generic interfaces?

(May 10 '11 at 04:20) Dmitri Maximov Dmitri%20Maximov's gravatar image

I have checked, and this behavior exists for non generic interfaces too

(May 10 '11 at 04:36) pil0t pil0t's gravatar image

Thanks for the clarification.

(May 10 '11 at 04:41) Dmitri Maximov Dmitri%20Maximov's gravatar image

One Answer:

Fixed in revision 7514. Nightly build will be available soon in download section.

answered May 11 '11 at 10:15

Dmitri%20Maximov's gravatar image

Dmitri Maximov

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