package de.accso.flexinale.infrastructure.persistence;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface VorfuehrungJpaRepository extends JpaRepository<VorfuehrungEntity, String> {

    @Query("SELECT v FROM Vorfuehrung v WHERE v.film.id = :filmId ORDER BY v.zeit")
    List<VorfuehrungEntity> findByFilmId(String filmId);
}
