This commit is contained in:
2020-05-18 16:04:41 +00:00
parent 49ef9d1a20
commit eacf8eb7aa
2 changed files with 18 additions and 21 deletions

View File

@@ -1,9 +1,6 @@
PRIORITY - ALWAYS Lowest level stuff first
=-=-=-=-
todo: Log configuration into server log at startup? https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3523
log all config settings into server log on boot
license?
todo:aycontext clean up old block of weird definitions
todo: apiokresponse returns readonly value every time, but I check it anyway at the client and biz object itself doesn't set it I don't think, so...should it be removed?
todo: Is there a log that records past jobs, how long can they be viewed?

View File

@@ -129,27 +129,27 @@ namespace AyaNova.Models
///////////////////////////////////////////////////////////////////////
//TODO: this entire block is almost certainly wrong or not required
//Indexes must be specified through fluent api unfortunately
modelBuilder.Entity<FileAttachment>().HasIndex(p => p.StoredFileName);
// //Indexes must be specified through fluent api unfortunately
// modelBuilder.Entity<FileAttachment>().HasIndex(p => p.StoredFileName);
//Relationships
modelBuilder.Entity<Translation>()
.HasMany(c => c.TranslationItems)
.WithOne(e => e.Translation)
.IsRequired();//default delete behaviour is cascade when set to isrequired
// //Relationships
// modelBuilder.Entity<Translation>()
// .HasMany(c => c.TranslationItems)
// .WithOne(e => e.Translation)
// .IsRequired();//default delete behaviour is cascade when set to isrequired
modelBuilder.Entity<User>()
.HasOne(p => p.UserOptions)
.WithOne(i => i.User)
.HasForeignKey<UserOptions>(b => b.UserId)
.OnDelete(DeleteBehavior.Cascade);//Hopefully will delete the useroptions with the user?
// modelBuilder.Entity<User>()
// .HasOne(p => p.UserOptions)
// .WithOne(i => i.User)
// .HasForeignKey<UserOptions>(b => b.UserId)
// .OnDelete(DeleteBehavior.Cascade);//Hopefully will delete the useroptions with the user?
//User->Widget Not certain about this definition
modelBuilder.Entity<User>()
.HasOne(p => p.Widget)
.WithOne(i => i.User)
.HasForeignKey<Widget>(b => b.UserId)
.OnDelete(DeleteBehavior.NoAction);
// //User->Widget Not certain about this definition
// modelBuilder.Entity<User>()
// .HasOne(p => p.Widget)
// .WithOne(i => i.User)
// .HasForeignKey<Widget>(b => b.UserId)
// .OnDelete(DeleteBehavior.NoAction);
//////////////////////////////////////////////////////////////