I want to retrieve Screening with Seat and with Booking by booking id. Screening has a one-to-many relationship with Seat and Seat has a one-to-many relationship with Booking (a seat can have multiple bookings, but only one can be active, the rest must be canceled). I wrote such a method, but it gets MultipleBagException:
@Query("select s from booking_screening s join fetch s.seats se join fetch se.bookings b where b.id = :bookingId")
Optional<Screening> readByBookingId(@Param("bookingId") Long booking);