Darkk3n / EngineeringManagement

0 stars 0 forks source link

Fix logic of adding Facility Certifications #6

Closed Darkk3n closed 9 months ago

Darkk3n commented 9 months ago

Steps

  1. Add a single certification to a facility
  2. Open the dialog again and add another one

When saving, an error pops up:

image

An error occurred while saving the entity changes. See the inner exception for details.

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: Facilities.Id'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

There seems to be an issue when loading the remaining that is duplicating the 1st record added.

Darkk3n commented 9 months ago

Comment test