Skip to content

Commit

Permalink
add database initilizer
Browse files Browse the repository at this point in the history
  • Loading branch information
WukAp committed Nov 9, 2024
1 parent 65da575 commit 5016ec3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void initBreeds() {
});
User user = userRepository.findAll().get(0);
Breed breed = breeds.get(0);
breed.setComments(List.of(Comment.builder().author(user.getName()).date(new Date()).text("My favorite!").likesUsersId(new HashSet<>() {{
breed.setComments(List.of(Comment.builder().id("1").author(user.getName()).date(new Date()).text("My favorite!").likesUsersId(new HashSet<>() {{
add(user.getName());
}}).build()));
breedRepository.saveAll(breeds);
Expand Down

0 comments on commit 5016ec3

Please sign in to comment.