Retrieve a list from database ,The relationships in XPath are recognized as bool.

0
I want to obtain and specify the data A related to C. When writing the XPath relationship in the "Retrieve" function, for example, to obtain the A object: A/A_B/B/B_C/C = $C. However, in this condition, A/A_B/B/B_C/C has been recognized as a bool. How should I proceed?
asked
3 answers
0

Hi Wang,

As per your explanation

There is one thing which wrong


When you write A/A_B/B/B_C/C, you're starting with A — the entity name,

  • In XPath, the entity context is already defined (it's the entity you're retrieving using Database).
  • ( A_B/B/B_C/C = $C ) Do this instead


Hope it helps 🙂

answered
0

When you do: A_B/B/B_C/C you're asking for A's that have an association over B to (a random) C, which is a yes or no condition, hence boolean.

If you want to compare to a specific C, you do:

A_B/B/B_C = $C

or

A_B/B/B_C/C/SomeIDAttribute = ID

answered
0

Hi Wang,
I see now


The issue is that at the end of XPath you are comparing the Obect with an Object.

the B_C/C = $C is wrong cause you need to check if the association of B_C exists for object $C.

[A --A_B--> B --B_C--> C] this is correct format.
Compare the object referenced by that association with the C object stored in $C variable


Please reference the screenshot,


Hope it helps 😁

answered