package com.jasamedika.medifirst2000.dao;

import java.util.List;
import java.util.Map;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.entities.MetodePengadaanDetail;

@Repository("MetodePengadaanDao")
public interface MetodePengadaanDetailDao extends PagingAndSortingRepository<MetodePengadaanDetail, Integer> {

	@Query("select new Map(model.id as id,model.name as name) from MetodePengadaanDetail model where metodePengadaanHeaderId=:noRec")
	List<Map<String,Object>> findByParent(@Param("noRec") Integer noRec);

}
