Whitney Martinez 5 gadus atpakaļ
vecāks
revīzija
b8d6ca7199

+ 1
- 0
src/main/java/io/zipcoder/tc_spring_poll_application/repositories/VoteRepository.java Parādīt failu

@@ -12,6 +12,7 @@ public interface VoteRepository extends CrudRepository<Vote, Long> {
12 12
             "AND v.OPTION_ID = o.OPTION_ID", nativeQuery = true)
13 13
     public Iterable<Vote> findVotesByPoll(Long pollId);
14 14
 
15
+
15 16
     public Iterable<Vote>findById(Long pollId);
16 17
 
17 18
 }

+ 2
- 0
src/main/resources/import.sql Parādīt failu

@@ -1,2 +1,4 @@
1
+
1 2
 insert into poll (poll_id, question) values (1, 'What is your favorite color?');
2 3
 insert into option (option_id, option_value, poll_id) values (1, 'Red', 1);
4
+insert into option (option_id, option_value, poll_id) values (2, 'Blue', 2);