You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
752 B

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package com.asset.master;
  2. import java.util.List;
  3. import org.springframework.data.jpa.repository.JpaRepository;
  4. import org.springframework.data.jpa.repository.Query;
  5. import org.springframework.stereotype.Repository;
  6. @Repository
  7. public interface MasterRepository extends JpaRepository<Master, Integer> {
  8. /*
  9. * @Query(
  10. * value="SELECT a.masterId, a.masterName, b.masterCharacteristic, b.masterQuestionType, \r\n"
  11. * +"b.masterQuestion FROM Master a INNER JOIN MasterDetail b ON a.masterId=b.masterId"
  12. * ,nativeQuery = false) public List<Master> findAllMasterDetail();
  13. */
  14. /*public List findAllMasterDetail();*/
  15. @Query(value="SELECT master_id, master_name FROM asset_master", nativeQuery=true)
  16. public List<Master> findAllMasterName();
  17. }