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

JPA #3

Merged
merged 2 commits into from
Oct 21, 2023
Merged

JPA #3

merged 2 commits into from
Oct 21, 2023

Conversation

viacheslav-torbin
Copy link
Owner

Liquibase added, repository now uses JpaRepository. Delete and update endpoints introduced

Copy link

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

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

Good job! Let's improve your solution!

pom.xml Outdated
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>

Choose a reason for hiding this comment

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

First, you don't create alias liquibase.version in properties your pom file.
Second, spring-boot-starter-parent already include liquibase, so you don't need to specify the version here.

@@ -16,4 +17,6 @@ public interface BookMapper {
BookDto toDto(Book book);

Book toBook(CreateBookRequestDto bookRequestDto);

void updateBookFromDto(CreateBookRequestDto book, @MappingTarget Book entity);

Choose a reason for hiding this comment

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

updateBook will be better


public interface BookRepository {
Book save(Book book);
public interface BookRepository extends JpaRepository<Book, Long> {

Choose a reason for hiding this comment

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

Annotation Repository is missing

Copy link

@NazarSmith228 NazarSmith228 left a comment

Choose a reason for hiding this comment

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

LGTM

@viacheslav-torbin viacheslav-torbin merged commit d0ad03e into master Oct 21, 2023
2 checks passed
@viacheslav-torbin viacheslav-torbin deleted the book-jpa branch October 21, 2023 21:24
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.

4 participants