Skip to content

Commit 2bfe702

Browse files
Moving to single PK column
1 parent db35161 commit 2bfe702

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

api/src/main/java/ca/bc/gov/educ/api/pen/replication/repository/TraxStudentCourseRepository.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,5 @@
1111

1212
@Repository
1313
public interface TraxStudentCourseRepository extends JpaRepository<TraxStudentCourseEntity, String> {
14-
void deleteAllByStudXcrseId_StudNo(String studNo);
15-
List<TraxStudentCourseEntity> findAllByStudXcrseId_StudNo(String studNo);
16-
17-
@Modifying
18-
@Query(value = "DELETE FROM STUD_XCRSE WHERE STUD_NO = ?", nativeQuery = true)
19-
@Transactional
20-
void deleteAllByStudNoNative(String studNo);
14+
List<TraxStudentCourseEntity> findAllByStudNo(String studNo);
2115
}

api/src/main/java/ca/bc/gov/educ/api/pen/replication/service/TraxStudentCourseService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public TraxStudentCourseService(TraxStudentCourseRepository traxStudentCourseRep
2020

2121
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2222
public List<TraxStudentCourseEntity> findTraxStudentCoursesByPen(final String pen) {
23-
return this.traxStudentCourseRepository.findAllByStudXcrseId_StudNo(pen);
23+
return this.traxStudentCourseRepository.findAllByStudNo(pen);
2424
}
2525

2626
// it is saved in a new transaction to make sure commit happens in DB.

0 commit comments

Comments
 (0)