Many to Many Relation entry is not removed.

Issue #111 duplicate
Saravana created an issue

Public class MailDetail { [PrimaryKey] public int Id { get; set; } public string Name { get; set; }

    [ManyToMany(typeof(MailLabelMapper))]
    public List<LabelDetail> Labels { get; set; }
}

public class LabelDetail { [PrimaryKey] public int Id { get; set; } public string Name { get; set; }

    [ManyToMany(typeof(MailLabelMapper))]
    public List<MailDetail> Mails { get; set; }
}

public class MailLabelMapper { [PrimaryKey, AutoIncrement] public int Id { get; set; }

    [ForeignKey(typeof(LabelDetail))]
    public int LabelId { get; set; }

    [ForeignKey(typeof(MailDetail))]
    public int MailId { get; set; }
}

when I delete an instance of LabelDetail the entry in relationtable is not removed

Comments (3)

  1. Log in to comment