JPA Entities and the Serializable Interface - edit after review

This commit is contained in:
Mladen Savic 2021-06-30 17:50:17 +02:00
parent d5c2b68a44
commit 860605b3e9
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class JPASerializableIntegrationTest {
entityManager.persist(user); entityManager.persist(user);
User userDb = entityManager.find(User.class, userId); User userDb = entityManager.find(User.class, userId);
assertEquals(userDb.getEmail().getName(), "johndoe"); assertEquals("johndoe", userDb.getEmail().getName());
} }
@Test @Test
@ -65,7 +65,7 @@ public void givenAssociation_whenPersisted_thenMultipleAccountsWillBeFoundByEmai
List userAccounts = entityManager.createQuery("select a from Account a join fetch a.user where a.user.email = :email") List userAccounts = entityManager.createQuery("select a from Account a join fetch a.user where a.user.email = :email")
.setParameter("email", email).getResultList(); .setParameter("email", email).getResultList();
assertEquals(userAccounts.size(), 2); assertEquals(2, userAccounts.size());
} }
@After @After