<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:inherit;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>[note this is an issue with sequences too]<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Quoting <a href="https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#identifiers-composite-nonaggregated">https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#identifiers-composite-nonaggregated</a><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;background:white'><span style='font-size:12.0pt;font-family:"inherit",serif;color:#333333;letter-spacing:-.1pt'>With non-aggregated composite identifiers, Hibernate also supports "partial" generation of the composite values.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;background:white'><i><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#7A2518'>Example 135. </span></i><i><span style='font-size:11.5pt;font-family:"Courier New";color:#7A2518;background:#F7F7F8'>@IdClass</span></i><i><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#7A2518'> with partial identifier generation using </span></i><i><span style='font-size:11.5pt;font-family:"Courier New";color:#7A2518;background:#F7F7F8'>@GeneratedValue</span></i><i><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#7A2518'><o:p></o:p></span></i></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I seem to be having the same issues as <a href="https://hibernate.atlassian.net/browse/HHH-6044">https://hibernate.atlassian.net/browse/HHH-6044</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have existing tables / Entities (simplified):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>CREATE</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>TABLE</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [cresaptown]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>.</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[saar]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [id] [bigint] </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>IDENTITY</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>1</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>,</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>1</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>)</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NOT</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NULL</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>primary</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>key</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>);</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Entity</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Table</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(schema = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"cresaptown"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>, name = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"saar"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>public</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> SystemAccessAuthorizationRequest</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'>{</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Id</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@GeneratedValue</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> Long </span><span style='font-size:12.0pt;font-family:Consolas;color:#0000C0'>id</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'>}</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>CREATE</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>TABLE</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [cresaptown]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>.</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[signature]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [rid] [bigint] </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>IDENTITY</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>1</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>,</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>1</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>)</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NOT</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NULL,</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [sid] [bigint] </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NOT</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>NULL,</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>PRIMARY</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>KEY </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[rid]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>,</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[sid]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>),</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>FOREIGN</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>KEY</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[rid]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>)</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>REFERENCES</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> [cresaptown]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>.</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[saar]</span><span style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>(</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>[id]</span><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>)</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white'>);</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Entity</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Table</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(schema = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"cresaptown"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>, name = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"signature"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@IdClass</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(Signature.ID.</span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>public</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> Signature</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'>{</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Id</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Column</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(name = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"sid"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@GeneratedValue</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> Long </span><span style='font-size:12.0pt;font-family:Consolas;color:#0000C0'>sid</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@Id</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@JoinColumn</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(name = </span><span style='font-size:12.0pt;font-family:Consolas;color:#2A00FF'>"rid"</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#646464'>@ManyToOne</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> SystemAccessAuthorizationRequest </span><span style='font-size:12.0pt;font-family:Consolas;color:#0000C0'>rid</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>public</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>static</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> <u>ID</u> </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>implements</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> Serializable</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> {</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> Long </span><span style='font-size:12.0pt;font-family:Consolas;color:#0000C0'>sid</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> Long </span><span style='font-size:12.0pt;font-family:Consolas;color:#0000C0'>rid</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> }</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'>}</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>A code fragment <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>em</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>.getTransaction().begin();</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> SystemAccessAuthorizationRequest </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>saar</span><span style='font-size:12.0pt;font-family:Consolas;color:black'> = </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>new</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> SystemAccessAuthorizationRequest();</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>em</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>.persist(</span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>saar</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> Signature </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>sig</span><span style='font-size:12.0pt;font-family:Consolas;color:black'> = </span><b><span style='font-size:12.0pt;font-family:Consolas;color:#7F0055'>new</span></b><span style='font-size:12.0pt;font-family:Consolas;color:black'> Signature();</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>sig</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>.<u>setRid</u>(</span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>saar</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>em</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>.persist(</span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>sig</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:black'> </span><span style='font-size:12.0pt;font-family:Consolas;color:#6A3E3E'>em</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>.getTransaction().commit();</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>gives this exception, but if I disable the null check in <span style='font-size:12.0pt;font-family:Consolas;color:black;background:#E8F2FE'>AbstractEntityTuplizer</span><span style='font-size:12.0pt;font-family:Consolas;color:black;background:#D4D4D4'>.getIdentifier</span>, I get the same issue as in HHH-6044<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>javax.persistence.PersistenceException</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>: </span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>org.hibernate.HibernateException</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>: No part of a composite identifier may be null</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.ExceptionConverterImpl.convert(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ExceptionConverterImpl.java:154</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.ExceptionConverterImpl.convert(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ExceptionConverterImpl.java:181</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.ExceptionConverterImpl.convert(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ExceptionConverterImpl.java:188</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.SessionImpl.firePersist(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>SessionImpl.java:716</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.SessionImpl.persist(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>SessionImpl.java:696</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at x.Testclass.x(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>Testclass.java:38</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at sun.reflect.NativeMethodAccessorImpl.invoke0(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>Native Method</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at java.lang.reflect.Method.invoke(Unknown Source)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>FrameworkMethod.java:50</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.internal.runners.model.ReflectiveCallable.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ReflectiveCallable.java:12</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.model.FrameworkMethod.invokeExplosively(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>FrameworkMethod.java:47</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.internal.runners.statements.InvokeMethod.evaluate(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>InvokeMethod.java:17</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner.runLeaf(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:325</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.BlockJUnit4ClassRunner.runChild(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>BlockJUnit4ClassRunner.java:78</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.BlockJUnit4ClassRunner.runChild(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>BlockJUnit4ClassRunner.java:57</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner$3.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:290</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner$1.schedule(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:71</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner.runChildren(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:288</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner.access$000(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:58</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner$2.evaluate(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:268</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.junit.runners.ParentRunner.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ParentRunner.java:363</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>JUnit4TestReference.java:89</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>TestExecution.java:41</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>RemoteTestRunner.java:541</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>RemoteTestRunner.java:763</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>RemoteTestRunner.java:463</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>RemoteTestRunner.java:209</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'>Caused by: </span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>org.hibernate.HibernateException</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>: No part of a composite identifier may be null</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.tuple.entity.AbstractEntityTuplizer$IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller.getIdentifier(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>AbstractEntityTuplizer.java:365</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>AbstractEntityTuplizer.java:219</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>AbstractEntityPersister.java:5119</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>AbstractEntityPersister.java:4819</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.engine.internal.ForeignKeys.isTransient(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>ForeignKeys.java:294</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.event.internal.EntityState.getEntityState(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>EntityState.java:59</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>DefaultPersistEventListener.java:95</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>DefaultPersistEventListener.java:55</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>EventListenerGroupImpl.java:102</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> at org.hibernate.internal.SessionImpl.firePersist(</span><u><span style='font-size:12.0pt;font-family:Consolas;color:#0066CC'>SessionImpl.java:710</span></u><span style='font-size:12.0pt;font-family:Consolas;color:red'>)</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas;color:red'> ... 25 more</span><span style='font-size:12.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:12.0pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>