Error while diffing spatial seed data
See original GitHub issueDiffing the model snapshot against the original model in ModelSnapshotSqlServerTest.SeedData_annotations_are_stored_in_snapshot()
results in the following exception.
System.ArgumentException: Operation does not support GeometryCollection arguments
at NetTopologySuite.Geometries.Geometry.CheckNotGeometryCollection(Geometry g)
at NetTopologySuite.Geometries.Geometry.Relate(Geometry g)
at NetTopologySuite.Geometries.Geometry.EqualsTopologically(Geometry g)
at Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer`1.Equals(T left, T right) in src\EFCore\ChangeTracking\ValueComparer`.cs:line 230
at Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer`1.Equals(Object left, Object right) in src\EFCore\ChangeTracking\ValueComparer`.cs:line 212
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.DiffData(TableMapping source, TableMapping target, DiffContext diffContext) in src\EFCore.Relational\Migrations\Internal\MigrationsModelDiffer.cs:line 1811
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Diff(TableMapping source, TableMapping target, DiffContext diffContext)+MoveNext() in src\EFCore.Relational\Migrations\Internal\MigrationsModelDiffer.cs:line 605
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.DiffCollection[T](IEnumerable`1 sources, IEnumerable`1 targets, DiffContext diffContext, Func`4 diff, Func`3 add, Func`3 remove, Func`4[] predicates)+MoveNext() in src\EFCore.Relational\Migrations\Internal\MigrationsModelDiffer.cs:line 2097
at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Sort(IEnumerable`1 operations, DiffContext diffContext) in src\EFCore.Relational\Migrations\Internal\MigrationsModelDiffer.cs:line 189
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.GetDifferences(IModel source, IModel target) in src\EFCore.Relational\Migrations\Internal\MigrationsModelDiffer.cs:line 153
at Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest.Test(IModel model, String expectedCode, Action`2 assert) in test\EFCore.Design.Tests\Migrations\ModelSnapshotSqlServerTest.cs:line 3749
at Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest.Test(Action`1 buildModel, String expectedCode, Action`2 assert) in test\EFCore.Design.Tests\Migrations\ModelSnapshotSqlServerTest.cs:line 3673
at Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest.SeedData_annotations_are_stored_in_snapshot() in test\EFCore.Design.Tests\Migrations\ModelSnapshotSqlServerTest.cs:line 3174
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Seeding Related Data in EF Core 3, getting error
c# - Seeding Related Data in EF Core 3, getting error: Object reference not set to an instance of an object - Stack...
Read more >BinDiff6 on IDA 7.5 and windows 7 · Issue #71
It loads the extension in IDA PRO 7.5 without any issues. ... Now when I do BinDiff (Diff Database (.idb)) the exporting of...
Read more >A quick tale about FEFF, an invisible UTF-8 character that ...
Today, we encountered an error while trying to create some database seeds from a CSV. This CSV was originally generated by me using...
Read more >Grouping Analysis (Spatial Statistics) - ArcGIS Pro Resources
Specifies how initial seeds are obtained when the Spatial Constraint parameter selected is No spatial constraint. Seeds are used to grow groups. If...
Read more >Automatic Seeding in Always On Availability Groups
This article gives an overview of Automatic Seeding in Always On Availability Groups along with Monitoring and internals of it.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@roji Looks like it’s working now! It didn’t work for the InMemory-db though (“fixed” it with
Database.IsSqlServer()
). I keep forgetting how modular and customizable EF Core actually is!@OskarKlintrot you can copy GeometryValueComparer.cs and make the switch to EqualsExact just like #18946 did. See these docs about value comparers.