0

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?

Lester
  • 513
  • 5
  • 15

2 Answers2

0

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).

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
0

I resolved the problem using the following query:

SELECT VALUE c FROM OFTYPE (Persons, Customer) AS c
WHERE c.Active == true
Lester
  • 513
  • 5
  • 15