-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Reverse engineering a SQLite database with spatialite tables fails #2571
Comments
@andrerav First, EF Core Power Tools does not look at the code in your project. Currently I have not enabled support for spatial with Sqlite, but I can investigate the possibility of doing this. https://github.com/ErikEJ/EFCorePowerTools/wiki/Reverse-Engineering#mapping |
I implemented a fix for this in the latest daily build, would be grateful if you could try it out. |
@andrerav The dailiy build is taking longer than expected, I will keep you posted |
I was not able to do this, as the payload of my extension became unmanageable. I will revisit for EF Core 9, looks like the payload was smaller with that. |
Hi @ErikEJ, I was unable to get around this using EF Power Tools, so I went back to dotnet ef dbcontext scaffold and manually specified the tables I wanted to scaffold (using multiple Geometry columns are correctly generated as well provided that the If I don't specify the tables manually I get the same error message using I think that being able to simply filter/specify the tables I want to scaffold could go a long way as a workaround for this issue. |
@andrerav The GUI is there to show all tables, perhaps the CLI will work better for you, though you might have to create the initial config file using a non spatial scracth database file. |
@andrerav hang on, are you saying that the tool should avoid discovering the spatial system files as well (and then also support the spatial EF Core plugin) for this to work? Can you tell me what the names of these table are? |
@ErikEJ If I create a new, empty Sqlite database, load the spatialite extension, and execute A rather long list of triggers are created as well when initializing the spatial metadata. |
@andrerav Have you seen this: https://stackoverflow.com/questions/78937032/entity-framework-core-cannot-scaffold-sqlite-database-with-spatialite-microsof (DROP the KNN2 table) |
Provide steps to reproduce a bug
SELECT load_extension('mod_spatialite');
SELECT InitSpatialMetaData();
5: Observe error message:
Provide technical details
EF Core Power Tools version: 2.6.497
Exact Visual Studio version: Version 17.12.0 Preview 2.0
Database engine: SQLite with Spatialite extension
EF Core version in use: EF Core 8
Is Handlebars templates used: no
Is T4 templates used: no
Is a SQL Server .dacpac used: no
The text was updated successfully, but these errors were encountered: