I'm having issues executing a simple breeze# query with a Where
clause that has an entity relation in it. Note, filtering by props that are on the DatHood
entity does not have an issue. My query in question looks like this:
var query = new EntityQuery<DatHood>().Where(z => z.Facility.RegionId == regionId).Expand("Facility");
var hoods = await EM.ExecuteQuery(query);
ExecuteQuery throws:
The member 'RegionId' is not supported
with the StackTrace being:
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitMember(MemberExpression m)
at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitBinaryComparison(BinaryExpression b, String op)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitBinary(BinaryExpression b)
at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitMethodCall(MethodCallExpression m)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitMethodCall(MethodCallExpression m)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.VisitRoot(Expression expression)
at Breeze.Sharp.Json.JsonQueryExpressionVisitor.Translate(Expression expression)
at Breeze.Sharp.EntityQuery`1.GetJsonResourcePath(String resourceName)
at Breeze.Sharp.EntityQuery`1.GetResourcePath(MetadataStore metadataStore)
at Breeze.Sharp.EntityManager.<ExecuteQuery>d__42.MoveNext()
My client entities:
public partial class DatHood : BaseEntity
{
public DatHood() {}
public Guid HoodGuid { get { return GetValue<Guid>(); } set { SetValue(value); } }
.
.
[ForeignKey("Facility")]
public string FacilityId { get { return GetValue<string>(); } set { SetValue(value); } }
public DatCustomer Facility { get { return GetValue<DatCustomer>(); } set { SetValue(value); } }
}
public partial class DatCustomer : BaseEntity
{
public DatCustomer() {}
public string FacilityId { get { return GetValue<string>(); } set { SetValue(value); } }
public bool FacilityStatus { get { return GetValue<bool>(); } set { SetValue(value); } }
public string RegionId { get { return GetValue<string>(); } set { SetValue(value); } }
.
.
}
Any light on how to resolve the 'member is not supported' exception would be greatly appreciated!
question from:
https://stackoverflow.com/questions/65928842/breeze-member-is-not-supported 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…