Skip to content

Commit

Permalink
#37: Fix category/tag in parent tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-sita committed Jul 19, 2024
1 parent 7314d85 commit db5774a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public Set<Tag> parentTags(UUID imageId) {
.where(PARENT_CHILD_IMAGE.CHILD_IMAGE_ID.eq(imageId))
.fetchSet(PARENT_CHILD_IMAGE.PARENT_IMAGE_ID);

List<Tag> tags = dslContext.select(IMAGE_TAGS.TAG, IMAGE_TAGS.TAG_CATEGORY)
List<Tag> tags = dslContext.select(IMAGE_TAGS.TAG_CATEGORY, IMAGE_TAGS.TAG)
.from(IMAGE_TAGS)
.where(IMAGE_TAGS.IMAGE_ID.in(parents))
.fetch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ public void shouldGetParentTags() {

// then
assertThat(parentTags).containsExactlyInAnyOrder(
new Tag("TAG1", "CATEGORY1"),
new Tag("TAG2", "CATEGORY2"),
new Tag("TAG3", "CATEGORY3"),
new Tag("TAG4", "CATEGORY4")
new Tag("CATEGORY1", "TAG1"),
new Tag("CATEGORY2", "TAG2"),
new Tag("CATEGORY3", "TAG3"),
new Tag("CATEGORY4", "TAG4")
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ public void initParents() {
parentTagsTableView.setItems(parentTagsData);

parentsTagsCategoryColumn.setCellValueFactory(cellData -> new ReadOnlyStringWrapper(cellData.getValue().category()));
parentsTagsEntryColumn.setCellValueFactory(cellData -> new ReadOnlyStringWrapper(cellData.getValue().value()));
parentsTagsEntryColumn.setCellValueFactory(cellData -> new ReadOnlyStringWrapper(cellData.getValue().tag()));
}

private record ParentTags(String category, String value) {
private record ParentTags(String category, String tag) {

}

Expand Down

0 comments on commit db5774a

Please sign in to comment.