开发者

Entity SQL query with hierarchal relation

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 sta开发者_如何学JAVAte "'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?


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:

SELECT VALUE c FROM OFTYPE (Persons, Customer) AS c
WHERE c.Active == true
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜