Left join Fetch Not working on multiple conditions

@vlad

I am writing this query.
SELECT distinct g FROM Group g left join fetch g.groupPlaylists as gp on gp.playEndDay >= CURRENT_DATE and gp.status <>:status where g.zoneId= :zoneId and g.status <>:status

But it throwing exception.
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: with-clause not allowed on fetched associations; use filters [SELECT distinct g FROM com.instoreradio.model.Group g left join fetch g.groupPlaylists as gp on gp.playEndDay >= CURRENT_DATE and gp.status <>:status where g.zoneId= :zoneId and g.status <>:status]

Is there any solution to this problem.

It working without fetch but returning wrong GroupPlaylist

Can you share your table structure and desired results you want to achieve?
Fetch is used to override lazyness of associated collection. so it cant be used in the where clause. https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#hql-explicit-join