![]() I believe this says that when deleting the Event.Owner AppUser, then take NoAction on the events in it's AppUser.Events collection. This lets EF know to not worry about cascading deletes for AppUser.Events. In the program we need to make sure a user is not an Event.Owner anywhere before deleting them. Public void Configure(EntityTypeBuilder builder) ![]() public class EventConfiguration : IEntityTypeConfiguration Update: If I add the following, then it can create the database. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Introducing FOREIGN KEY constraint 'FK_Signups_Events_EventId' on table 'Signups' may cause cycles or multiple cascade paths. See previous errors.Īt .OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)Īt .OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)Īt .ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)Īt .TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)Īt .RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite)Īt .InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName)Īt .ExecuteNonQuery()Īt .ExecuteNonQuery(RelationalCommandParameterObject parameterObject)Īt .ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)Īt .MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)Īt .Migrator.Migrate(String targetMigration)Īt .MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)Īt .UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)Īt .UpdateDatabase.c_Displa圜lass0_0.b_0()Īt .OperationBase.Execute(Action action)ĬlientConnectionId:e4518a03-b5e4-4bb1-b69b-29cab3418f83 Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.Ĭould not create constraint or index. (0x80131904): Introducing FOREIGN KEY constraint 'FK_Signups_Events_EventId' on table 'Signups' may cause cycles or multiple cascade paths. ![]() This makes no sense to me as this is a clean 1:many relationship. I am getting the error: (0x80131904): Introducing FOREIGN KEY constraint 'FK_Signups_Events_EventId' on table 'Signups' may cause cycles or multiple cascade paths. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |