具有层次关系的实体 SQL 查询
我想使用 Entity SQL 查询实体模型中某些子类型的元素。例如...
SELECT VALUE c FROM Persons AS c
WHERE c is of (Customer)
同时没问题,但如果我尝试以下查询,其中 Active
是 Customer 实体的属性...
SELECT VALUE c FROM Persons AS c
WHERE c is of (Customer) AND c.Active == true
我收到一条错误,指出“'Active' 不是当前加载的架构中“Person”类型的成员。”
上面的查询中缺少什么?到底有可能吗?
I want to use Entity SQL to query the elements of some subtype in my Entity Model. For instance...
SELECT VALUE c FROM Persons AS c
WHERE c is of (Customer)
no problem meanwhile, but if I try the following query where Active
is a property of Customer entity...
SELECT VALUE c FROM Persons AS c
WHERE c is of (Customer) AND c.Active == true
I got an error that state "'Active' is not a member of type 'Person' in the currently loaded schemas."
What I'm missing from the above query? It is possible after all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定,但也许你应该用
=
替换==
?由于他在抱怨属性名称,目前还不清楚,您是否使用复数服务,也许您必须注意“
c
”的含义。这一个更有可能是原因(
I am not sure, but maybe you should replace the
==
with=
?It's still not clear since he's complaining on the property name, do you use a pluralization service, maybe you have to take care on the meaning of '
c
'.This one is more likely the cause (See here).
我使用以下查询解决了该问题:
I resolved the problem using the following query: