Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Fix JPA error of not being able to find ID #312

@knjk04

Description

@knjk04

Describe the bug

updateAuthorAffectsOneRow fails in AuthorTest.

[ERROR] updateAuthorAffectsOneRow  Time elapsed: 0 s  <<< ERROR!
org.springframework.orm.jpa.JpaObjectRetrievalFailureException: Unable to find com.karankumar.bookproject.backend.entity.Book with id 25; nested exception is javax.persistence.EntityNotFoundException: Unable to find com.karankumar.bookproject.backend.entity.Book with id 25
        at com.karankumar.bookproject.backend.entity.AuthorTest.updateAuthorAffectsOneRow(AuthorTest.java:73)
Caused by: javax.persistence.EntityNotFoundException: Unable to find com.karankumar.bookproject.backend.entity.Book with id 25
        at com.karankumar.bookproject.backend.entity.AuthorTest.updateAuthorAffectsOneRow(AuthorTest.java:73)

To Reproduce
Steps to reproduce the behaviour:

  1. Run mvn clean install

Expected behaviour

No errors. Test passes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingspringSpring-related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions