Skip to content

Commit

Permalink
#48 [feat] : 삭제 쿼리문 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbang105 committed Jun 10, 2024
1 parent 0def125 commit e8e2990
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
package org.dgu.backend.repository;

import jakarta.transaction.Transactional;
import org.dgu.backend.domain.UpbitKey;
import org.dgu.backend.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface UpbitKeyRepository extends JpaRepository<UpbitKey,Long> {
UpbitKey findByUser(User user);

@Transactional
@Modifying(clearAutomatically = true)
@Query("delete from UpbitKey where id = :id")
void deleteUpbitKeyById(Long id);
}

0 comments on commit e8e2990

Please sign in to comment.