Jpa
jpa nativeQuery 로 오라클 시퀀스 호출
무대포 개발자
2020. 12. 1. 21:11
728x90
반응형
jpa nativeQuery 로 오라클 시퀀스 호출
- jpa 에서 오라클 시퀀스 호출하는 법
@Repository
public interface xxxRepository extends JpaRepostiroy<Test, BigDecimal> {
@Query(value = "SELECT test_sequence.nextval from dual", nativeQuery = true)
BigDecimal findTestSeq();
}