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

Geospatial queries on collections don't seem to work #6640

Closed
sync-by-unito bot opened this issue May 17, 2023 · 0 comments · Fixed by #6645
Closed

Geospatial queries on collections don't seem to work #6640

sync-by-unito bot opened this issue May 17, 2023 · 0 comments · Fixed by #6645
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented May 17, 2023

We have the following model:

public partial class Company : IRealmObject
{
    public string Name { get; set; }

    public IList<CustomGeoPoint> Offices { get; }
}

public partial class CustomGeoPoint : IEmbeddedObject
{
    public IList<double> coordinates { get; }

    public string type { get; set; } = "Point";
}

And the following data:

[{ "Name":"1,2",
    "Offices":[{
        "type":"Point",
        "coordinates":[ 1.0, 1.0 ]
    }, {
        "type":"Point",
        "coordinates":[ 2.0, 2.0 ]
    }]
}, { 
    "Name":"2,3",
    "Offices":[{
        "type":"Point",
        "coordinates":[ 2.0, 2.0 ]
    }, {
        "type":"Point",
        "coordinates":[ 3.0, 3.0 ]
    }]
}]

Then, this query doesn't return any results, even though I would expect it to match the first company:

Offices GEOWITHIN GeoSphere([1, 1], 0.00872665)
@ironage ironage mentioned this issue May 17, 2023
3 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant