Multiple joins in query filter don't work

My data source query has a query filter with multiple joins:


 <query>
    <![CDATA[select e my$Odx e]]>
    <filter>
        <c join=" JOIN e.systems s JOIN <b>s</b>.brand b JOIN <b>b</b>.vehicles v">v.id = :param$vehicle</c>
     </filter>
</query>

At runtime the joined table identifiers (“s”, “b”) seems to be replaced and I got the following exception:
com.haulmont.cuba.core.sys.jpql.JpqlSyntaxException: Errors found for input jpql:[select e from my$Odx e JOIN e.systems s JOIN e.brand b JOIN e.vehicles v where v.id = :param_vehicle]
Cannot resolve joined entity[Join variable: v]

Hi Stefan,
It seems like a bug. We’ll check it.
Thank you for the report!

The problem is fixed in the platform version 6.2.6.

I got this error in Version 6.8, too.