Error 3002: Problem in mapping fragments run at line 1330:Potential runtime activity of table FTPRuns’s keys (FTPRuns.ID):
Error 3002: Problem in line 1330:Potential runtime activity of table FTPRuns’s keys (FTPRuns.ID): Columns (ftpruns. ID) are mapped to EntitySet FTPRuns’s properties (ftpruns. ID) on the conceptual side but they do not form the EntitySet’s key properties (ftpruns. ID, ftpruns. LastRun)
Your entity model has the combination of the two properties FTPRuns.ID and FTPRuns.LastRun as entity key while your table has only the column FTPRuns.ID as primary key. So in your model you specify that the combination of FTPRuns.ID and FTPRuns.LastRun must be unique while your database has the stronger requirement that FTPRuns.ID alone must be unique.
Just exclude the property FTPRuns.LastRun from the entity key. Maybe this happened accidentally or the Entity Framework could not get primary key information from the database and had to infer the entity key. For example views have no primary key and the Entity Framework will infer the entity key as the combination of all non-nullable columns.
entity is the compound primary key of two attributes ftpruns. ID and ftpruns. LastRun, while the database table only has one ftpruns. ID as the primary key. All your entities must specify a composite primary key for two properties, whereas the database requires only ftPRUNs. ID to be unique.
excludes the ftpruns. LastRun attribute from the entity primary key, which may happen accidentally, or EF cannot get the primary key information from the database and must notify the entity primary key. For example, if you look at a table that has no primary key, EF will tell the entity to use all columns that are not empty as its primary key
- Solution of duplicate entry ‘value’ for key ‘field name’ in MySQL
- MySQL error: can’t create table ‘..’（ errno:150 ）Solutions
- [reprint and save] MySQL does not set the primary key and uses the self growing ID method
- Table ‘sell.hibernate_sequence‘ doesn‘t exist
- Ora-02292: integrity constraint (XX) violated – child record found foreign key Association, record cannot be deleted
- MySQL:Foreign key fails with error Error Code: 1452.
- mysql error 1062
- The solution of duplicate entry ‘for key’ primary ‘when inserting data in MySQL
- What is the schema in the database?
- Failed to add the foreign key constraint. Missing index for constraint ‘stu_ibfk_1’ in the reference
- MySQL failed to add foreign key error 1452
- mysql ERROR 1050 (42S01): Table already exists
- The solution of Hibernate query returning all null lists
- 1822 – Failed to add the foreign key constraint. Missing index for constraint ‘tb_emp_ibfk_1’ in the
- javax.persistence.EntityNotFoundException : unable to find error
- Ctfhub error injection
- Error attempting to get column ‘failure_msg‘ from result set
- Errors in IntelliJ ieeasql statements and table names in @ table
- [Oracle] when inserting data, “ora-00001: unique constraint” appears
- Cause: java.sql.BatchUpdateException: Unknown column ‘xxx‘ in ‘field list‘