Skip to content
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

Spatial support in SQLite for Point #1514

Open
radderz opened this issue Jun 5, 2024 · 0 comments
Open

Spatial support in SQLite for Point #1514

radderz opened this issue Jun 5, 2024 · 0 comments

Comments

@radderz
Copy link

radderz commented Jun 5, 2024

I have found that using the bulk import function fails when using a Point type spatial object which maps to a POINT column type. Using add range works fine so the context is setup right but this library doesn't seem to support geometry (in my case Point) types in SQLite.

Is there anything I need to do to get this to work?

System.InvalidOperationException: No mapping exists from object type NetTopologySuite.Geometries.Point to a known managed provider native type.
   at Microsoft.Data.Sqlite.SqliteValueBinder.Bind()
   at Microsoft.Data.Sqlite.SqliteParameter.Bind(sqlite3_stmt stmt)
   at Microsoft.Data.Sqlite.SqliteParameterCollection.Bind(sqlite3_stmt stmt)
   at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
   at EFCore.BulkExtensions.SqlAdapters.SQLite.SqliteOperationsAdapter.InsertAsync[T](DbContext context, Type type, IList`1 entities, TableInfo tableInfo, Action`1 progress, Boolean isAsync, CancellationToken cancellationToken) in /_/EFCore.BulkExtensions/SqlAdapters/SQLite/SqLiteAdapter.cs:line 84
   at EFCore.BulkExtensions.SqlAdapters.SQLite.SqliteOperationsAdapter.InsertAsync[T](DbContext context, Type type, IList`1 entities, TableInfo tableInfo, Action`1 progress, Boolean isAsync, CancellationToken cancellationToken) in /_/EFCore.BulkExtensions/SqlAdapters/SQLite/SqLiteAdapter.cs:line 105
   at EFCore.BulkExtensions.SqlAdapters.SQLite.SqliteOperationsAdapter.Insert[T](DbContext context, Type type, IList`1 entities, TableInfo tableInfo, Action`1 progress) in /_/EFCore.BulkExtensions/SqlAdapters/SQLite/SqLiteAdapter.cs:line 22
   at EFCore.BulkExtensions.SqlBulkOperation.Insert[T](DbContext context, Type type, IList`1 entities, TableInfo tableInfo, Action`1 progress) in /_/EFCore.BulkExtensions/SqlBulkOperation.cs:line 55
   at EFCore.BulkExtensions.DbContextBulkTransaction.Execute[T](DbContext context, Type type, IList`1 entities, OperationType operationType, BulkConfig bulkConfig, Action`1 progress) in /_/EFCore.BulkExtensions/DbContextBulkTransaction.cs:line 45
   at EFCore.BulkExtensions.DbContextBulkExtensions.BulkInsert[T](DbContext context, IList`1 entities, BulkConfig bulkConfig, Action`1 progress, Type type) in /_/EFCore.BulkExtensions/DbContextBulkExtensions.cs:line 21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant