@Test public void testTableSequenceIdentifierGenerator() { LOGGER.debug("testTableSequenceIdentifierGenerator"); doInJPA( entityManager -> { for (int i = 0; i < 5; i++) { entityManager.persist(new TableSequenceIdentifier()); } entityManager.flush(); }); }
@Test public void test() { doInJPA( entityManager -> { Post post = new Post(); post.setId(1L); post.setTitle("High-Performance Java Persistence"); entityManager.persist(post); }); doInJPA( entityManager -> { Post post = entityManager.find(Post.class, 1L); LOGGER.info("Fetched post: {}", post); post.setScore(12); }); }