ManyToOne constraint not working
I have very simple relationship, my model looks like this: public class Project { [PrimaryKey, AutoIncrement] public int ID { get; set; } public string Name { get; set; } [ForeignKey(typeof(User))] public int ProjectManagerID { get; set; } [ManyToOne] public User ProjectManager { get; set; } } public class User { public string Login { get; set; } [OneToMany] public List<Project> Projects { get; set; } } The problem is that I can easly save project, with its reference to user without saving user, and I don't get any constraint violation exception. database.Insert(new Project { Name = "aaa",