Closed aradalvand closed 8 months ago
Thanks @aradalvand, keep 'em coming...
This plugin is much more complicated than it seems, unfortunately. But we're hopefully close to getting rid of the issues.
This plugin is much more complicated than it seems
Very true, I experienced that firsthand when I tried to give fixing #234 a shot, but the plugin's implementation was nowhere near as straightforward as I thought it would be, so I had to give up :D Thanks for all the hard work!
@aradalvand I've fixed this - will give it a few more days to see if other bug reports popup before releasing 8.0.3.
@aradalvand can I ask you to give the latest version a test? You can download the nupkg here from the build artifacts - it would be good to get confirmation that at least in your case there are no other pending problems.
@roji Sure. I just tested it and the weird RenameIndex
es are now gone. So, this has been fixed.
There also don't seem to be any more issues in my case related to this plugin. Thanks.
Thank you! I'll give it a couple more days and then release.
Hi Guys (@roji )
Has the default TPH behavior been changed to TPT in 8.0.1?
We're upgrading from 8.0.0 and EF is trying to generate a table for each type and blowing up, where-as before it was all in the inherited class' table.
Also, we started seeing errors that we had to suppress using Microsoft.EntityFrameworkCore.Diagnostics.RelationalEventId.ForeignKeyPropertiesMappedToUnrelatedTables which we're nervous about. Also related to inheritance in our case.
Is 8.0.1 safe? Are there breaking changes somewhere?
Thanks! Denis
@DenisSikic 8.0.3 is out, have you tried that?
@roji I have 8.0.3 naming conventions, and 8.0.1 everything else (all latest).
Are you saying you're seeing a behavior difference between EF 8.0.0 and 8.0.1 (while keeping EFCore.NamingConventions at 8.0.3)? If so, that's definitely I'd like to see in a minimal, runnable repro - can you please open a new issue with one?
@roji Yes I'm seeing TPH no longer as the default behaviour. Trying to currently force TPH via OnModelCreating reflection loop. Still researching, if I can fix it I'll try to create you a sample otherwise I'm going to revert back to 8.0.0.
@DenisSikic I'd very much appreciate seeing a sample - just reverting back wouldn't give us the opportunity to investigate and fix a possible bug (either here in EFCore.NamingConventions or in EF itself).
@roji I couldn't reproduce it in a separate project. I had this code to fix some snake case bug that showed up Sep 29, 2023. Now when I remove it, everything is fine and it appears that bug was fixed and now my code was causing issues.
@DenisSikic thanks for spending the time to look into it! Please don't hesitate to open a new issue if you do run into trouble.
I'm now on 8.0.2 (although I did observe this same problem in 8.0.1 too) and the plugin seems to be messing with TPH index names this time.
Updating
EFCore.NamingConventions
to8.0.2
and then runningdotnet ef migrations add ...
creates this weird migration for me:It apparently wants to make the
ix
prefix uppercase, which definitely looks like a bug; and this is, once again, only happening for TPH tables.Minimal repro:
.csproj
:Program.cs
:dotnet run
output — notice how theIX
prefix is uppercased.