Skip to content

Commit adcf418

Browse files
kruschebassner
andauthored
Apply suggestions from code review
Co-authored-by: Patrick Bassner <[email protected]>
1 parent 45ff162 commit adcf418

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/de/tum/cit/aet/artemis/lecture/domain/LectureUnit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void setCompetencyLinks(Set<CompetencyLectureUnitLink> competencyLinks) {
111111
this.competencyLinks = competencyLinks;
112112
}
113113

114-
// NOTE: we explicitly do not add LectureTranscription here to avoid Hibernate loading issues because of its OneToOne relationship with is automatically EAGER and cannot be set
114+
// NOTE: we explicitly do not add LectureTranscription here to avoid Hibernate loading issues because of its OneToOne relationship which is automatically EAGER and cannot be set
115115
// to LAZY
116116

117117
@JsonIgnore(false)

src/main/java/de/tum/cit/aet/artemis/lecture/repository/SlideRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public interface SlideRepository extends ArtemisJpaRepository<Slide, Long> {
6767
*
6868
* @param slideId The ID of the slide to unhide
6969
*/
70-
@Transactional // ok because of delete
70+
@Transactional // ok because of modifying query
7171
@Modifying
7272
@Query("""
7373
UPDATE Slide s
@@ -80,7 +80,7 @@ public interface SlideRepository extends ArtemisJpaRepository<Slide, Long> {
8080
SELECT new de.tum.cit.aet.artemis.lecture.dto.SlideDTO(s.id, s.slideNumber, s.hidden, s.attachmentUnit.id)
8181
FROM Slide s
8282
WHERE s.attachmentUnit.id IN :attachmentUnitIds
83-
AND s.hidden IS NULL OR s.hidden > CURRENT_TIMESTAMP()
83+
AND (s.hidden IS NULL OR s.hidden > CURRENT_TIMESTAMP())
8484
""")
8585
Set<SlideDTO> findVisibleSlidesByAttachmentUnits(@Param("attachmentUnitIds") Set<Long> attachmentUnitIds);
8686
}

0 commit comments

Comments
 (0)