-
Notifications
You must be signed in to change notification settings - Fork 230
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
Using geography[] mapped to a List<Point> on entity for requests #2722
Comments
This is indeed not currently supported; in general, translating arbitrary LINQ operators (such as Any above) over primitive collections is covered by dotnet/efcore#30426, which I'm currently working on for EF Core 8.0. Though geometry collections specifically may pose some additional complications: see dotnet/efcore#30630 for some thoughts on generally representing collections of geometries in databases, /cc @ajcvickers (we just had a discussion around this). To help us design things better, are you aware of the GeometryCollection type, which is a specialized type for representing collections of geometries? Can you provide some context on why you chose to use |
I wasn't aware of the Thank you for your help. |
That's good to hear, but how exactly did it fix your issue? IIRC Any with Intersect isn't yet working on GeometryCollection either... |
I defined the Points of the entity this way : public GeometryCollection? Points { get; set; } And I am querying this way: var query = dbContext.MapEntityCaches.Where(mec => b.Polygon.Intersects(mec.Points)); The results are consistent so it seems it's working. |
OK thanks, yeah - that makes sense. Am going to close this as the problem has been resolved, but see related conversation in dotnet/efcore#30630. |
I'm having trouble to use npgsql with a edge-case that seems to touch the limitation of the translation capabilities.
I have a
geography[]
mapped to aList<Point>
and I want to list all entities that will match the predicate that given a Polygon I want all entities with at least a point that intersects.I'm having the following property on an entity:
And I'm requesting it the following way:
I'm having the following error message:
Is this a bug on npgsql or am I requesting it incorrectly ?
The text was updated successfully, but these errors were encountered: