<!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/c9f60a86d82d60f31813f5cc7dcfb34e?s=48&amp;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fc9f60a86d82d60f31813f5cc7dcfb34e%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="herbert.atlassian" id="email_herbert.atlassian" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=herbert.atlassian" style="color:#6c797f;; color: #3b73af; text-decoration: none">Herbert Poul</a> <strong>created</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-12433" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-5bd13075-8749-45ea-ab71-688f3816cb06" height="16" width="16" border="0" align="absmiddle" alt="Bug" style="vertical-align: text-bottom"></a> <a href="https://hibernate.atlassian.net/browse/HHH-12433" style="color: #3b73af; text-decoration: none">HHH-12433</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-12433" style="color: #3b73af; text-decoration: none">@Table annotation UniqueConstraints require physical name for JoinColumns</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">Issue Type:</th> 
                                                    <td class="has-icon" style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <img src="cid:jira-generated-image-avatar-5bd13075-8749-45ea-ab71-688f3816cb06" height="16" width="16" border="0" align="absmiddle" alt="Bug" style="vertical-align: text-bottom"> Bug </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Affects Versions:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> 5.2.15 </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Assignee:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> Unassigned </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Components:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> hibernate-core </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Created:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> 26/Mar/2018 15:52 PM </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Environment:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> Hibernate 5.2.12.Final </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Priority:</th> 
                                                    <td class="has-icon" style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <img src="cid:jira-generated-image-static-major-9d77d209-04f3-41bb-b35f-7220161c985f" height="16" width="16" border="0" align="absmiddle" alt="Major" style="vertical-align: text-bottom"> Major </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Reporter:</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="herbert.atlassian" id="email_herbert.atlassian" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=herbert.atlassian" style="color:#6c797f;; color: #3b73af; text-decoration: none">Herbert Poul</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"> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0; margin-top: 0">When using a custom PhysicalNamingStrategy the `columnNames` require the physical name for JoinColumn (ManyToOne), but the logical name for normal columns. (imo the logical name is expected?)</p> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">I have tried to create a runnable example here: <a href="https://github.com/hpoul/hibernate-joincolumns-test-case/blob/master/orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://github.com/hpoul/hibernate-joincolumns-test-case/blob/master/orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java</a></p> <h2 style="margin: 10px 0 0; font-size: 20px; font-weight: normal; line-height: 1.500; margin: 40px 0 0"><a name="Models%3A" style="color: #3b73af; text-decoration: none"></a>Models:</h2> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
        @Table(uniqueConstraints = @UniqueConstraint(columnNames = {<span class="code-quote" style="color: #009100">"col1_id"</span>, <span class="code-quote" style="color: #009100">"col2"</span>}))
<span class="code-comment" style="color: #808080">//        @Table(uniqueConstraints = @UniqueConstraint(columnNames = {<span class="code-quote" style="color: #009100; color: #808080">"col1_id_PHYSICAL"</span>, <span class="code-quote" style="color: #009100; color: #808080">"col2"</span>}))
</span>        @Entity
        <span class="code-keyword" style="color: #000091">static</span> <span class="code-keyword" style="color: #000091">class </span>Test2 {
                @Id
                <span class="code-keyword" style="color: #000091">public</span> <span class="code-object" style="color: #910091">Long</span> id;

                @JoinColumn(nullable = <span class="code-keyword" style="color: #000091">false</span>)
                @ManyToOne
                <span class="code-keyword" style="color: #000091">public</span> Test1 col1;

                <span class="code-keyword" style="color: #000091">public</span> <span class="code-object" style="color: #910091">String</span> col2;
        }
</pre> 
                                                            </div>
                                                        </div> <h2 style="margin: 10px 0 0; font-size: 20px; font-weight: normal; line-height: 1.500; margin: 40px 0 0"><a name="Setup" style="color: #3b73af; text-decoration: none"></a>Setup</h2> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
                Properties props = <span class="code-keyword" style="color: #000091">new</span> Properties();
                props.put(AvailableSettings.HBM2DDL_AUTO, <span class="code-quote" style="color: #009100">"create"</span>);
                props.put(AvailableSettings.PHYSICAL_NAMING_STRATEGY, TestPhysicalNamingStrategy.<span class="code-keyword" style="color: #000091">class.</span>getName());
                Persistence.generateSchema(<span class="code-quote" style="color: #009100">"templatePU"</span>, props);
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">`TestPhysicalNamingStrategy` is a simple PhysicalNamingStrategy which simply appends _PHYSICAL to all names: </p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal"><span class="code-keyword" style="color: #000091">return</span> <span class="code-keyword" style="color: #000091">new</span> Identifier(name.getText() + <span class="code-quote" style="color: #009100">"_PHYSICAL"</span>, <span class="code-keyword" style="color: #000091">false</span>);</pre> 
                                                            </div>
                                                        </div> <h2 style="margin: 10px 0 0; font-size: 20px; font-weight: normal; line-height: 1.500; margin: 40px 0 0"><a name="Problem" style="color: #3b73af; text-decoration: none"></a>Problem</h2> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">when running with:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {<span class="code-quote" style="color: #009100">"col1_id"</span>, <span class="code-quote" style="color: #009100">"col2"</span>}))
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">The error is: </p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
Caused by: org.hibernate.AnnotationException: Unable to create unique key constraint (col1_id, col2) on table JPAUnitTestCase$Test2_PHYSICAL: database column <span class="code-quote" style="color: #009100">'col1_id'</span> not found. Make sure that you use the correct column name which depends on the naming strategy in use (it may not be the same as the property name in the entity, especially <span class="code-keyword" style="color: #000091">for</span> relational types)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.buildUniqueKeyFromColumnNames(InFlightMetadataCollectorImpl.java:2074)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.buildUniqueKeyFromColumnNames(InFlightMetadataCollectorImpl.java:1935)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processUniqueConstraintHolders(InFlightMetadataCollectorImpl.java:1923)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1595)
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">but with the following code it works:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {<span class="code-quote" style="color: #009100">"col1_id_PHYSICAL"</span>, <span class="code-quote" style="color: #009100">"col2"</span>}))
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">which is weird, because i'd expect both being _PHYSICAL or both being logical names.</p> <h2 style="margin: 10px 0 0; font-size: 20px; font-weight: normal; line-height: 1.500; margin: 40px 0 0"><a name="my2cents" style="color: #3b73af; text-decoration: none"></a>my 2 cents</h2> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">I have traced the problem back to: Ejb3JoinColumn#buildDefaultColumnName(final PersistentClass referencedEntity, final String logicalReferencedColumn) - this method returns the physical name:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
                <span class="code-keyword" style="color: #000091">return</span> physicalNamingStrategy.toPhysicalColumnName( columnIdentifier, database.getJdbcEnvironment() )
                                .render( database.getJdbcEnvironment().getDialect() );
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">but it is called by Ejb3JoinColumn#linkValueUsingDefaultColumnNaming which stores the result as logical name:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
                <span class="code-object" style="color: #910091">String</span> columnName = buildDefaultColumnName( referencedEntity, logicalReferencedColumn );

                <span class="code-comment" style="color: #808080">//yuk side effect on an implicit column
</span>                setLogicalColumnName( columnName );
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">( <a href="https://github.com/hibernate/hibernate-orm/blob/5.2/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java#L468-L471" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://github.com/hibernate/hibernate-orm/blob/5.2/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java#L468-L471</a> )</p> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">which probably makes no real sense? anyway, this makes the InFlightMetadataCollectorImpl -&gt; columnNameBindingByTableMap.get("Test2").logicalToPhysical map look like: </p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
binding = {InFlightMetadataCollectorImpl$TableColumnNameBinding@3020}
 tableName = <span class="code-quote" style="color: #009100">"JPAUnitTestCase$Test2_PHYSICAL"</span>
 logicalToPhysical = {HashMap@3021}  size = 3
  0 = {HashMap$Node@3032} <span class="code-quote" style="color: #009100">"col1_id_PHYSICAL"</span> -&gt; <span class="code-quote" style="color: #009100">"col1_id_PHYSICAL"</span>
  1 = {HashMap$Node@3033} <span class="code-quote" style="color: #009100">"id"</span> -&gt; <span class="code-quote" style="color: #009100">"id_PHYSICAL"</span>
  2 = {HashMap$Node@3034} <span class="code-quote" style="color: #009100">"col2"</span> -&gt; <span class="code-quote" style="color: #009100">"col2_PHYSICAL"</span>
 physicalToLogical = {HashMap@3029}  size = 3
  0 = {HashMap$Node@3045} <span class="code-quote" style="color: #009100">"col2_PHYSICAL"</span> -&gt; <span class="code-quote" style="color: #009100">"col2"</span>
  1 = {HashMap$Node@3046} <span class="code-quote" style="color: #009100">"id_PHYSICAL"</span> -&gt; <span class="code-quote" style="color: #009100">"id"</span>
  2 = {HashMap$Node@3047} <span class="code-quote" style="color: #009100">"col1_id_PHYSICAL"</span> -&gt; <span class="code-quote" style="color: #009100">"col1_id_PHYSICAL"</span>
</pre> 
                                                            </div>
                                                        </div> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0">which makes no sense for the JoinColumn..</p> </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-12433?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-12433#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-a45db391-b4de-4a29-aa11-212b9adb4f42" 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-12433#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#100082-<span title="267fc7f3e68a0d4c270a5b724f030696137047d2" data-commit-id="267fc7f3e68a0d4c270a5b724f030696137047d2}">sha1:267fc7f</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-eaa56267-4627-4f17-aba3-3a08a16f43ba" 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>   
    
<img src="https://u4043402.ct.sendgrid.net/wf/open?upn=YNXLe5Uzuivj8jGpuXra04BSJ-2BS7raa1puTAtyVUP-2F0UG25sB-2BHToWWBMcbXwnNU-2Bsw6xQ2j44X1Lp2naLM90iuAzLaBcNO-2BvAcsvIUiLu3Jwfg-2BNybmuc05Qk4yIFKeAkHiMgixeWbGPWLf0N1xi22CxOo1AeskBLeTGAc77VGS9DYi9AMxdzozd2-2FM-2FuQLOPSwgy2SWcDg-2FbRpmQhXfRLZzFXipcxn1MvL5QIiL23y9NUdarVBb767gB2DFbv1SZKpkXLOAwhochRjPlkPxK-2FjqubGyVR2ldbtVkgFL0PdCj31Ds5Qfj2T9VcZTaWrjVdxuXjgo-2Bmkcpbq3q6pJVoKPNp5GN3zwkFI7HgNsoPVeJOitnQ7UyLmQ3IEuJBaCB0AB4rFBqcgFDcZbOEmlloZuraViX1zIJwuJL7c99RQPu2I5RgCq0B1Dfoc0Ax9tvcj12CLhog5GyRCCeTC1w-3D-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body>
</html>