@@ -0,0 +1,1751 @@
+package com.vladmihalcea.hibernate.masterclass.laboratory.idgenerator;%0A%0Aimport java.util.Properties;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.GenerationType;%0Aimport javax.persistence.Id;%0A%0Aimport org.junit.Test;%0A%0Aimport com.vladmihalcea.hibernate.masterclass.laboratory.util.AbstractPostgreSQLIntegrationTest;%0A%0Apublic class PostgreSQLAutoTest extends AbstractPostgreSQLIntegrationTest %7B%0A%0A    @Override%0A    protected Class%3C?%3E%5B%5D entities() %7B%0A        return new Class%3C?%3E%5B%5D %7B%0A            Post.class,%0A        %7D;%0A    %7D%0A%0A    @Override%0A    protected Properties getProperties() %7B%0A        Properties properties = super.getProperties();%0A        properties.put(%22hibernate.order_inserts%22, %22true%22);%0A        properties.put(%22hibernate.order_updates%22, %22true%22);%0A        properties.put(%22hibernate.jdbc.batch_size%22, %225%22);%0A        return properties;%0A    %7D%0A%0A    @Test%0A    public void testBatch() %7B%0A        doInTransaction(session -%3E %7B%0A            for (int i = 0; i %3C 3; i++) %7B%0A                Post post = new Post();%0A                post.setTitle(%0A                    String.format(%22High-Performance Java Persistence, Part %25d%22, i + 1)%0A                );%0A%0A                session.persist(post);%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Entity(name = %22Post%22)%0A    public static class Post %7B%0A%0A        @Id%0A        @GeneratedValue(strategy = GenerationType.AUTO)%0A        private Long id;%0A%0A        private String title;%0A%0A        public Long getId() %7B%0A            return id;%0A        %7D%0A%0A        public void setId(Long id) %7B%0A            this.id = id;%0A        %7D%0A%0A        public String getTitle() %7B%0A            return title;%0A        %7D%0A%0A        public void setTitle(String title) %7B%0A            this.title = title;%0A        %7D%0A    %7D%0A%7D%0A

Add funding profile