Usage of the Where Condition in the Query Builder

Dear Aras Community,

I have a problem with the following scenarion:

I have an ItemType A an ItemType B and a Relationship ItemType BA from B to A.

Now I have Item B1 related to A1 and A2 with the Relationships BA1 and BA2, like following:

                                        A1 <---BA1--- B1 ---BA2---> A2

I created a Query with the Query Builder to create a Tree Grid View on the ItemType A. With this Query I want to see e.g. from A1's POV to which other A's B1 is related. The problem is that I always get shown the starting Item (in this example A1) as well.

The Query looks like following;

Item_A_1

            [Item_A_1.id = [Item_BA related_id].related.id]             Item_BA related_id

                    [Item_BA related_id].source_id = Item_B              Item_B
                           [Item_B.id = [Item_BA].source_id]                  Item_BA
                               [Item_BA].related_id = Item_A_2.id            Item_A_2
Of course this Query will return A1 and A2 because B1 is related to both of them.
This is why I tried to define a Where Condition on the last Query line: Item_A_2.id != Item_A1.id but this does not work. If I hardcode the ID of Item_A1 it works but of course this is not a solution.
How can I solve this Problem?
Thanks  for your help in advance.
Max