Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add category model #13

Merged
merged 2 commits into from
Mar 8, 2024
Merged

add category model #13

merged 2 commits into from
Mar 8, 2024

Conversation

artemsa223
Copy link
Owner

No description provided.

return categoryService.createCategory(requestDto);
}

@PreAuthorize("hasRole('ROLE_USER')")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to check everywhere for user role, cause this endpoints is only for authenticated users

@@ -32,5 +38,13 @@ public class Book {
private String coverImage;
@Column(nullable = false)
private boolean isDeleted = false;

@ManyToMany(fetch = FetchType.EAGER)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use FetchType.lazy

@artemsa223 artemsa223 requested a review from Vasul-Pankiv March 7, 2024 18:16
@artemsa223 artemsa223 merged commit 0e3557e into main Mar 8, 2024
2 checks passed
@artemsa223 artemsa223 deleted the category branch March 8, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants