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
精彩评论