<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://hibernate.atlassian.net"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://avatar-cdn.atlassian.com/48ffea36a8b10d3cb355b0e235bd594f?s=48&amp;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F48ffea36a8b10d3cb355b0e235bd594f%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="adrodoc55" id="email_adrodoc55" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=adrodoc55" style="color:#6c797f;; color: #3b73af; text-decoration: none">Adrodoc</a> <strong>updated</strong> an issue </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="page-title-pattern-first-line " style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; padding-top: 10px"> <a href="https://hibernate.atlassian.net/browse/HHH" style="color: #3b73af; text-decoration: none">Hibernate ORM</a> / <a href="https://hibernate.atlassian.net/browse/HHH-12711" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-6f52fce8-3c7c-48f6-8764-a9d4d4731647" height="16" width="16" border="0" align="absmiddle" alt="Bug" style="vertical-align: text-bottom"></a> <a href="https://hibernate.atlassian.net/browse/HHH-12711" style="color: #3b73af; text-decoration: none">HHH-12711</a> </td> 
                                                </tr> 
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HHH-12711" style="color: #3b73af; text-decoration: none">@BatchSize and hibernate.default_batch_fetch_size should affect eager loading of non-owning one-to-one relations</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand  wrapper-special-margin" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 10px; padding-bottom: 5px" bgcolor="#ffffff"> 
                                        <table class="keyvalue-table" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Change By:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <a class="user-hover" rel="adrodoc55" id="email_adrodoc55" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=adrodoc55" style="color:#6c797f;; color: #3b73af; text-decoration: none">Adrodoc</a> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand  issue-description-container" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 5px; padding-bottom: 10px" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0; border-collapse: collapse; padding: 0 0 10px"> <span class="diffaddedchars" style="background-color:#ddfade;">"</span> <span class="diffcontext">When executing a jpql query FetchMode.JOIN (which is the default for eager to one relations) is ignored. This is reasonable, because it would alter the query executed by the user. The unfortunate side effect is that n+1 queries are executed to fill the eager relation. Making the relation lazy is not always possible, because a non-owning optional relation can't be lazy.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>To</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nTo</span> <span class="diffcontext"> prevent n+1 queries you can use the awesome feature @BatchSize or hibernate.default_batch_fetch_size. This works fine for both lazy and eager one-to-one relations one the owning side, but it does not work for non-owning eager (lazy is not possible due to HHH-12709) one-to-one relations.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>This</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nThis</span> <span class="diffcontext"> is a big performance problem and I believe this is the main reason why people say one should avoid bidirectional one-to-one relations in hibernate.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>Looking</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nLooking</span> <span class="diffcontext"> at the code this is because in [EntityType.resolve|https://github.com/hibernate/hibernate-orm/blob/f2238ec089d139270ff151771692fa4dcc4d7256/hibernate-core/src/main/java/org/hibernate/type/EntityType.java#L463-L468] it uses loadByUniqueKey for non-owning one-to-one realations, but unlike resolveIdentifier which internally calls [DefaultLoadEventListener.loadFromDatasource|https://github.com/hibernate/hibernate-orm/blob/f2238ec089d139270ff151771692fa4dcc4d7256/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java#L509] which uses batch fetching, [loadByUniqueKey uses Loader.doQuery|https://github.com/hibernate/hibernate-orm/blob/f2238ec089d139270ff151771692fa4dcc4d7256/hibernate-core/src/main/java/org/hibernate/loader/Loader.java#L924] which does not use batch fetching.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\nTestcase:\r\n</span> <span class="diffcontext">{code:java}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>package</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\npackage</span> <span class="diffcontext"> org.hibernate.bugs;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\nimport</span> <span class="diffcontext"> static org.assertj.core.api.Assertions.assertThat;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\nimport</span> <span class="diffcontext"> java.util.ArrayList;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> java.util.Collections;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> java.util.List;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\nimport</span> <span class="diffcontext"> javax.persistence.CascadeType;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.Entity;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.EntityManager;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.EntityManagerFactory;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.FetchType;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.Id;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.OneToOne;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.Persistence;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> javax.persistence.Query;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\nimport</span> <span class="diffcontext"> org.apache.log4j.AppenderSkeleton;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.apache.log4j.Level;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.apache.log4j.Logger;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.apache.log4j.spi.LoggingEvent;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.hibernate.annotations.BatchSize;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.junit.After;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.junit.Before;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>import</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nimport</span> <span class="diffcontext"> org.junit.Test;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">/**</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext"> * This template demonstrates how to develop a test case for Hibernate ORM, using the Java Persistence API.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext"> */</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>public</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\npublic</span> <span class="diffcontext"> class JPAUnitTestCase {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private EntityManagerFactory entityManagerFactory;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private Logger sqlLogger;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private Level initialSqlLevel;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Before</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void init() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;sqlLogger = Logger.getLogger(</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">"org.hibernate.SQL</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">");</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;initialSqlLevel = sqlLogger.getLevel();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;sqlLogger.setLevel(Level.DEBUG);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManagerFactory = Persistence.createEntityManagerFactory(</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">"templatePU</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">");</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@After</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void destroy() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManagerFactory.close();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;sqlLogger.setLevel(initialSqlLevel);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;// Entities are auto-discovered, so just add them anywhere on class-path</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;// Add your tests, using standard JUnit.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Test</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void hhh123Test() throws Exception {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;EntityManager entityManager = entityManagerFactory.createEntityManager();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;int numberOfParents = 5;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;runInTransaction(entityManager, () -&gt; {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int id = 0; id &lt; numberOfParents; id++) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parent parent = new Parent(id);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new Child(id + 100, parent);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entityManager.persist(parent);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;});</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;runInTransaction(entityManager, () -&gt; {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RecordingLog4jAppender appender = new RecordingLog4jAppender();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sqlLogger.addAppender(appender);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query query = entityManager.createQuery(</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">"from</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> " + Parent.class.getSimpleName());</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@SuppressWarnings(</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">"unchecked</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">")</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List&lt;Parent&gt; parents = query.getResultList();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sqlLogger.removeAppender(appender);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertThat(parents).hasSize(numberOfParents);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertThat(appender.getLogEvents()).size().isLessThan(numberOfParents);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;});</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManager.close();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private void runInTransaction(EntityManager entityManager, Runnable runnable) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManager.getTransaction().begin();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;runnable.run();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManager.getTransaction().commit();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;entityManager.clear();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n\r\n</span> <span class="diffcontext">@Entity</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">@BatchSize(size = 20)</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>class</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nclass</span> <span class="diffcontext"> Parent {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Id</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private long id;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@OneToOne(mappedBy =</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> "parent</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">", cascade = CascadeType.ALL)</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private Child child;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;Parent() {}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public Parent(long id) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;this.id = id;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public Child getChild() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return child;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;void setChild(Child child) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;this.child = child;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Override</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public String toString() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> "Parent [id=</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">" + id +</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> ", child=</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">" + child +</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> "]</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">";</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n\r\n</span> <span class="diffcontext">@Entity</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">@BatchSize(size = 20)</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br>class</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\nclass</span> <span class="diffcontext"> Child {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Id</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private long id;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@OneToOne(fetch = FetchType.LAZY)</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private Parent parent;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;Child() {}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public Child(long id, Parent parent) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;this.id = id;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;setParent(parent);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public Parent getParent() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return parent;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void setParent(Parent parent) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;this.parent = parent;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;parent.setChild(this);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Override</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public String toString() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> "Child [id=</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">" + id +</span> <span class="diffaddedchars" style="background-color:#ddfade;"> \</span> <span class="diffcontext"> "]</span> <span class="diffaddedchars" style="background-color:#ddfade;">\</span> <span class="diffcontext">";</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br><br>class</span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n\r\nclass</span> <span class="diffcontext"> RecordingLog4jAppender extends AppenderSkeleton {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private final List&lt;LoggingEvent&gt; logEvents = new ArrayList&lt;&gt;();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;private boolean active = true;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Override</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public boolean requiresLayout() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return false;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Override</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;protected void append(LoggingEvent loggingEvent) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;if (active) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logEvents.add(loggingEvent);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;@Override</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void close() {}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void setActive(boolean value) {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;active = value;</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public void clear() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;logEvents.clear();</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n\r\n</span> <span class="diffcontext">&nbsp;&nbsp;public List&lt;LoggingEvent&gt; getLogEvents() {</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;&nbsp;&nbsp;return Collections.unmodifiableList(logEvents);</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">&nbsp;&nbsp;}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n</span> <span class="diffcontext">{code}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">\r\n"</span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> <script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "description": "View Issue",
  "potentialAction": {
    "@type": "ViewAction",
        "target": "https://hibernate.atlassian.net/browse/HHH-12711?inbox=true&",
    "name": "View Issue"
      },
  "publisher": {
    "@type": "Organization",
    "name": "Atlassian",
    "url": "https://www.atlassian.com"
  }
}
</script> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HHH-12711#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-ea514a89-f55e-41e9-8030-077d0d83e240" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HHH-12711#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-mobile-separated-links" class="mobile-resize-text" width="100%" colspan="2" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> Get Jira notifications on your phone! Download the Jira Cloud app for <a href="https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&amp;referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail" style="color: #3b73af; text-decoration: none">Android</a> or <a href="https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&amp;ct=EmailNotificationLink&amp;mt=8" style="color: #3b73af; text-decoration: none">iOS</a> 
                                        <hr> </td> 
                                </tr> 
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian Jira <span id="footer-build-information">(v1001.0.0-SNAPSHOT#100087-<span title="6ad10047bf8aeb3b2ecb62de896f35bf37250172" data-commit-id="6ad10047bf8aeb3b2ecb62de896f35bf37250172}">sha1:6ad1004</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0; border-collapse: collapse; padding-top: 3px; opacity: 0.150"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-47d5c170-690b-4d94-ac65-9747fdf99918" alt="Atlassian logo" title="Atlassian logo" width="192" height="24" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>