mirror of
https://github.com/OtusTeam/Spring.git
synced 2026-11-18 20:07:12 +00:00
2024-01 spring-11-jpql fix
This commit is contained in:
1 parent
0ef3161c9d
commit
f50cd0bc4b
1 file changed
+2
-2
+2
-2
@@ -103,7 +103,7 @@ class OtusStudentRepositoryJpaTest {
|
||||
void shouldUpdateStudentNameById() {
|
||||
val firstStudent = em.find(OtusStudent.class, FIRST_STUDENT_ID);
|
||||
String oldName = firstStudent.getName();
|
||||
//em.detach(firstStudent);
|
||||
em.detach(firstStudent);
|
||||
|
||||
repositoryJpa.updateNameById(FIRST_STUDENT_ID, STUDENT_NAME);
|
||||
val updatedStudent = em.find(OtusStudent.class, FIRST_STUDENT_ID);
|
||||
@@ -117,7 +117,7 @@ class OtusStudentRepositoryJpaTest {
|
||||
void shouldDeleteStudentNameById() {
|
||||
val firstStudent = em.find(OtusStudent.class, FIRST_STUDENT_ID);
|
||||
assertThat(firstStudent).isNotNull();
|
||||
//em.detach(firstStudent);
|
||||
em.detach(firstStudent);
|
||||
|
||||
repositoryJpa.deleteById(FIRST_STUDENT_ID);
|
||||
val deletedStudent = em.find(OtusStudent.class, FIRST_STUDENT_ID);
|
||||
|
||||
Reference in new issue
Block a user