タグ付けされた質問 「criteria-api」

2
基準SpatialRestrictions.IsWithinDistance NHibernate.Spatial
誰かがこれを実装しましたか、またはこれを実装することが困難であるかどうか/ポインタを持っているかどうかを知っていますか? public static SpatialRelationCriterion IsWithinDistance(string propertyName, object anotherGeometry, double distance) { // TODO: Implement throw new NotImplementedException(); } NHibernate.Spatial.Criterion.SpatialRestrictionsから hqlで「where NHSP.Distance(PROPERTY、:point)」を使用できます。しかし、このクエリを既存のCriteriaクエリと組み合わせたいと思います。 当面は、ラフポリゴンを作成し、 criteria.Add(SpatialRestrictions.Intersects("PROPERTY", myPolygon)); 編集 SpatialRelationCriterionのコンストラクターをオーバーロードして新しいSpatialRelation.Distanceを追加することで機能するプロトタイプを取得しました public static SpatialRelationCriterion IsWithinDistance(string propertyName, object anotherGeometry, double distance) { return new SpatialRelationCriterion(propertyName, SpatialRelation.Distance, anotherGeometry, distance); } SpatialRelationCriterionに新しいフィールドを追加しました private readonly double? distance; public SpatialRelationCriterion(string …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.