package com.its.api.its.repository.code;

import com.its.api.its.model.entity.code.TbCmtrGradClsf;
import com.its.api.its.model.entity.code.TbCmtrGradClsfKey;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbCmtrGradClsfRepository extends JpaRepository<TbCmtrGradClsf, TbCmtrGradClsfKey>, JpaSpecificationExecutor<TbCmtrGradClsf> {

    @Query(value = "select p from TbCmtrGradClsf p inner join fetch p.sect")
    List<TbCmtrGradClsf> findAll();

}
