package de.thpeetz.kontor.comics.repository;

import de.thpeetz.kontor.comics.data.*;
import org.springframework.data.jpa.repository.*;

import java.util.*;

public interface IssueWorkRepository extends JpaRepository<IssueWork, String> {

    @Query("SELECT i from IssueWork i where i.issue = ?1 and i.artist = ?2 and i.workType = ?3")
    IssueWork findbyIssueAndArtistAndWorktype(Issue issue, Artist artist, Worktype worktype);

    @Query("select i from IssueWork i where i.issue = ?1")
    List<IssueWork> findByIssue(Issue issue);
}
