Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Filtering inline comments by source attribute rather than source
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Willem Gmelig Meyling committed Jun 2, 2015
1 parent ccd335d commit 61f0bab
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public CommitComments(final EntityManager entityManager) {
@Transactional
public List<CommitComment> getCommentsFor(Group group, String... commitIds) {
return query().from(commitComment)
.where(commitComment.source.isNull()
.where(commitComment.source.sourceFilePath.isNull()
.and(commitComment.commit.repository.eq(group)
.and(commitComment.commit.commitId.in(commitIds))))
.list(commitComment);
Expand All @@ -46,7 +46,7 @@ public List<CommitComment> getCommentsFor(Group group, String... commitIds) {
@Transactional
public List<CommitComment> getCommentsFor(Group group, List<String> commitIds) {
return query().from(commitComment)
.where(commitComment.source.isNull()
.where(commitComment.source.sourceFilePath.isNull()
.and(commitComment.commit.repository.eq(group)
.and(commitComment.commit.commitId.in(commitIds))))
.list(commitComment);
Expand All @@ -61,7 +61,7 @@ public List<CommitComment> getCommentsFor(Group group, List<String> commitIds) {
@Transactional
public List<CommitComment> getInlineCommentsFor(Group group, Collection<String> commitIds) {
return query().from(commitComment)
.where(commitComment.source.isNotNull()
.where(commitComment.source.sourceFilePath.isNotNull()
.and(commitComment.commit.repository.eq(group)
.and(commitComment.commit.commitId.in(commitIds))))
.list(commitComment);
Expand Down

0 comments on commit 61f0bab

Please sign in to comment.