package vn.azteam.tpf.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import vn.azteam.tpf.domain.TBCode;

import java.util.Optional;

@Repository
public interface TBCodeRepository extends JpaRepository<TBCode, Long>, JpaSpecificationExecutor<TBCode> {


    //@Query("select tb_crop from TBCrop tb_crop left join fetch tb_crop.tbDetailUsers where tb_crop.id =:id")
    Optional<TBCode> findOneWithEagerRelationships(@Param("id") Long id);
}
