Generalization Xpath Query

0
Hello, I have entities A and B, and B is set to Generalization as A. In other words, B inherits from A. What I want to do is filter data from entity A using an XPath query based on B's Boolean property. How can I do this?
asked
2 answers
1

Hi,

If B is a specialization of A, then B inherits attributes from A, but A cannot use attributes defined only in B in an xpath constraint.


So if the boolean exists only on B, you should query B, not A - or move that attribute to A if it must be used for filtering at the generalized level.

answered
1

Hi Bo Sung Kim,


You can filter entity A based on a Boolean attribute in its specialization (B) by casting to the subtype in XPath:


[YourModule.B/YourBoolean = true()]


This works because B inherits from A, and XPath allows filtering A using attributes of its specialization


answered