-
Notifications
You must be signed in to change notification settings - Fork 40
Revert pull-in of GearsOfWar related classes and remove constraint #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7179a3a
to
1306278
Compare
That might work for GearsOfWar but the TPC and TPH sets are completely broken. The best case is if we can find a solution where both the model and the database are the same. In the above it is different. I've been experimenting with the following the the OnModelCreating of the Fixture
but it seems to be ignoring that custom type |
Unless this has recently been changed,
In case we don't find another way, we can always monkey patch it. |
1306278
to
7d82b94
Compare
Alright, I added the necessary constraint removal for the TPC and TPT variants as well. Here are the results:
The slight difference in before/after results might be connected to the fixture cleanup I did (which is unrelated to the constraint issue and can be reverted where necessary). @ChrisJollyAU Can I remove the |
The conversion is one thing, but it is the HasColumnType that is not overriding the column type. Possibly need dotnet/efcore#24685 and dotnet/efcore#27970 for that to work With regards to the test differences, it is nothing related to the fixture cleanup. Don't even have to look at the results, I've spent enough time playing in it to know the effects. It is just AssertSql failing on the different SQL generated by having LeaderSquadId go from MatchSimple was still in progress. It added the annotation, but I hadn't found the right area in the processing/translating to pick it up and add the correct SQL to narrow the query to behave the same way as the foreign key should |
…gn keys and NULL.
… because it doesn't do anything at the moment. This reverts commit 7640833.
7d82b94
to
6c78760
Compare
Thanks, I fixed the SQL assertions. All tests that succeeded before also succeed now:
The following additional test were incidentally fixed as well:
I reverted the related commit then for now. We want to keep the |
Yeah I was aware of those tests. Having the LEaderSquadId as int? produced an extra row full of NULL's rather than no row. See further comments in readme https://github.com/bubibubi/EntityFrameworkCore.Jet/blob/master/test/EFCore.Jet.CustomBaseTests/Readme.md |
I think the only SQL not matching is just that related to DateTimeOffset which is fine at the moment This will work for now but we should open an issue so that we can keep an eye on it and find a better solution that keeps the model and database in sync Also this will probably need to be backported to the 7.0 branch as well. I had initially been working on it there and cherry-picked into master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine now
Yeah, I saw that. I'll open an issue to discuss. |
Since the reason for our custom copy of the original EF Core
GearsOfWar
related classes is a FK constraint that is handled differently by Jet in comparison to other database engines, the simplest way to fix the issue for the test classes is to just drop the constraint.