main
Last change
on this file since ac151d1 was ac151d1, checked in by David <darsov2@…>, 11 days ago |
initial
|
-
Property mode
set to
100644
|
File size:
728 bytes
|
Line | |
---|
1 | package mk.ukim.finki.eglas.repository;
|
---|
2 |
|
---|
3 | import jakarta.transaction.Transactional;
|
---|
4 | import mk.ukim.finki.eglas.model.CandidacyVote;
|
---|
5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
6 | import org.springframework.data.jpa.repository.Modifying;
|
---|
7 | import org.springframework.data.jpa.repository.Query;
|
---|
8 | import org.springframework.data.repository.query.Param;
|
---|
9 |
|
---|
10 | public interface CandidacyVoteRepository extends JpaRepository<CandidacyVote, Long> {
|
---|
11 | @Modifying
|
---|
12 | @Transactional
|
---|
13 | @Query(value = "insert into glasovi_za_kandidat (ug_id, kan_id) values (:voteId, :candidacyId)", nativeQuery = true)
|
---|
14 | void voteForCandidate(@Param("voteId") Long voteId,
|
---|
15 | @Param("candidacyId") Long candidacyId);
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.