diff --git a/src/main/kotlin/dao/AlbumDao.kt b/src/main/kotlin/dao/AlbumDao.kt index 06f1eef..50e155a 100644 --- a/src/main/kotlin/dao/AlbumDao.kt +++ b/src/main/kotlin/dao/AlbumDao.kt @@ -20,6 +20,13 @@ fun findOneByIdWithLock(@Param("id") id: Long): AlbumEntity? @ResultMap("net.piedpiper.bremer.AlbumEntity") + @Select("SELECT * FROM album WHERE artist_id = #{artistId} AND name = #{name}") + fun findOneByArtistIdAndName( + @Param("artistId") artistId: Long, + @Param("name") name: String + ): AlbumEntity? + + @ResultMap("net.piedpiper.bremer.AlbumEntity") @Select( """