HQL unexpected end of subtree

14 Views Asked by At

I need to write a hql query to get all objects where a field is contains in a list of Integer.

But I have an error: unextected end of subtree

this is the request:

@Query(
        value = "SELECT DISTINCT sm FROM StopMatrix sm " +
            "JOIN FETCH sm.provider p " +
            "LEFT JOIN FETCH sm.authorizedStopCollection aus " +
            "LEFT JOIN FETCH aus.cstopStart cs " +
            "LEFT JOIN FETCH aus.cstopEnd ce " +
            "WHERE p.proCode IN (:allowedProviderCodes)"
    )
    List<StopMatrix> findAllByAllowedProviderCodes(@Param("allowedProviderCodes") List<Integer> readAllowedProviderCodes);

but I have this error:

org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [SELECT DISTINCT sm FROM com.parkeon.transfolio.fares.jpa.matrix.StopMatrix sm JOIN FETCH sm.provider p LEFT JOIN FETCH sm.authorizedStopCollection aus LEFT JOIN FETCH aus.cstopStart cs LEFT JOIN FETCH aus.cstopEnd ce WHERE p.proCode IN ()]

Does anyone know how to resolve it?

Thanks you

0

There are 0 best solutions below