Comments (6)
Thanks for the feedback - that make sense. I'm quite busy at the moment so I won't fix this at the moment. I will leave this issue open.
from efcore.testsupport.
Hi @JeanCollas,
Not defining a primary key in a class for EF Core would be caught when EF Core tries to build its model of the database. I don't think this a logging issue or an issue with the EfCore.TestSupport library.
from efcore.testsupport.
Actually I had Id keys missing on tables, the site runs well, but the script TestSupport crashes.
If you set the field Id as key, EF Core considers that the Id field is a key, even if it is not the case in the DB and it doesn't check it (it still works, it just has performances issues).
from efcore.testsupport.
OK, now I understand a bit better. When you say that
the script TestSupport crashes.
Do you think there is a bug in EfCore.TestSupport? If so, in what area?
from efcore.testsupport.
Yes, you may try it by just temporary removing one primary key in the SQL.
You will find that in Stage1Comparer
, all statements like entityType.FindPrimaryKey().Relational().Name
will break with a NullException (as the FindPrimaryKey()
returns null), which is forwarded in CompareEfWithDb
.
And of course the method CompareForeignKeys
never completes, but also CompareColumns
which checks for the primary key.
from efcore.testsupport.
hi @JeanCollas,
I have just released EfCore.TestSupport 1.5.2. In this I filter out DbQuery types, which was what caused the "no primary key" exception.
from efcore.testsupport.
Related Issues (20)
- EfSchemaCompare Does not detect missing Alternate Key HOT 2
- Mapping to Views HOT 7
- Support EF Core 5 HOT 6
- Support EF Core 3.1 for .NET Standard 2.0 HOT 2
- Only Supports Sqlite and SQL Server HOT 4
- Support for EF Core 5 HOT 2
- Support EF Core 5 HOT 2
- Is there any planned support for Nunit? HOT 1
- Security Vulnerability in EfCore.TestSupport v5.0.0 HOT 7
- Request: Create a separate respository / NuGet package for SeedDatabase feature HOT 5
- List in EF Core docs
- Hardcoded role name `postgres` HOT 4
- Suggestion: Extend EfCoreLogDecoder to decode CommandError as well as CommandExecuted HOT 3
- Issues with possible unintended re-use of SQLite in-memory DbContext? HOT 5
- CreateUniqueMethodOptions with temporal tables HOT 3
- AppSettings.GetConfiguration doesn't allow for environmental variable overrides HOT 2
- Use secrets.json HOT 1
- Support for EF Core 8.0 HOT 5
- System.IO.Pipelines HOT 2
- EnsureClean fails for PostgreSQL database if the schemas depend on each other HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcore.testsupport.