<!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="cid:jira-generated-image-avatar-4d2bc183-100f-4e8a-9fa5-5662462b9b79" 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="pandaadb" id="email_pandaadb" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=pandaadb" style="color:#6c797f;; color: #3b73af; text-decoration: none">Artur Kronenberg</a> <strong>commented</strong> on <a href="https://hibernate.atlassian.net/browse/HHH-10887" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-90141871-4b50-4523-bf8c-f3044344918f" height="16" width="16" border="0" align="absmiddle" alt="Improvement"> HHH-10887</a> </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 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-10887" style="color: #3b73af; text-decoration: none">Re: Limit Joins on Inheritance when querying Collections</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-pattern" 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; border-bottom: none; padding-bottom: 0" 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: 10px 0 0; margin-top: 0">Hi,</p> <p style="margin: 10px 0 0">I thought I would add the output of my test in case I described it weirdly. </p> <p style="margin: 10px 0 0">Here is the code I run (without the where clause): </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">
                TypedQuery&lt;Holder&gt; q = em.createQuery(<span class="code-quote" style="color: #009100">"SELECT h from HibernateTest$Holder h LEFT JOIN FETCH TREAT (h.list AS HibernateTest$B) e"</span>, Holder.class);
                
                List&lt;Holder&gt; resultList = q.getResultList();
                
                resultList.stream().flatMap( x-&gt; x.list.stream()).forEach(x -&gt; <span class="code-object" style="color: #910091">System</span>.err.println(x.getClass().getName()));
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">This is the output I get (in full):</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">
14:45:04.766 [main] DEBUG o.h.h.i.QueryTranslatorFactoryInitiator - QueryTranslatorFactory : org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory@3a60c416
14:45:04.766 [main] INFO  o.h.h.i.QueryTranslatorFactoryInitiator - HHH000397: Using ASTQueryTranslatorFactory
14:45:04.792 [main] DEBUG o.h.h.i.ast.QueryTranslatorImpl - parse() - HQL: SELECT h from test.pandaadb.HibernateTest$Holder h LEFT JOIN FETCH TREAT (h.list AS HibernateTest$B) e
14:45:04.796 [main] DEBUG o.h.hql.internal.ast.HqlParser - Registering discovered request to treat(h.list as HibernateTest$B)
14:45:04.798 [main] DEBUG o.h.h.i.ast.QueryTranslatorImpl - --- HQL AST ---
 \-[QUERY] Node: 'query'
    \-[SELECT_FROM] Node: 'SELECT_FROM'
       +-[FROM] Node: 'from'
       |  +-[RANGE] Node: 'RANGE'
       |  |  +-[DOT] Node: '.'
       |  |  |  +-[DOT] Node: '.'
       |  |  |  |  +-[IDENT] Node: 'test'
       |  |  |  |  \-[IDENT] Node: 'pandaadb'
       |  |  |  \-[IDENT] Node: 'HibernateTest$Holder'
       |  |  \-[ALIAS] Node: 'h'
       |  \-[JOIN] Node: 'JOIN'
       |     +-[LEFT] Node: 'LEFT'
       |     +-[FETCH] Node: 'FETCH'
       |     +-[DOT] Node: '.'
       |     |  +-[IDENT] Node: 'h'
       |     |  \-[IDENT] Node: 'list'
       |     \-[ALIAS] Node: 'e'
       \-[SELECT] Node: 'SELECT'
          \-[IDENT] Node: 'h'

14:45:04.799 [main] DEBUG o.h.hql.internal.ast.ErrorCounter - throwQueryException() : no errors
14:45:04.814 [main] DEBUG o.h.h.i.antlr.HqlSqlBaseWalker - select &lt;&lt; begin [level=1, statement=select]
14:45:04.822 [main] DEBUG o.h.h.internal.ast.tree.FromElement - FromClause{level=1} : test.pandaadb.HibernateTest$Holder (h) -&gt; hibernatet0_
14:45:04.823 [main] DEBUG o.h.h.i.ast.tree.FromReferenceNode - Resolved : h -&gt; hibernatet0_.holderId
14:45:04.824 [main] DEBUG o.h.hql.internal.ast.tree.DotNode - getDataType() : list -&gt; org.hibernate.type.BagType(test.pandaadb.HibernateTest$Holder.list)
14:45:04.825 [main] DEBUG o.h.h.i.ast.tree.FromElementFactory - createEntityAssociation() : One to many - path = h.list role = test.pandaadb.HibernateTest$Holder.list associatedEntityName = test.pandaadb.HibernateTest$A
14:45:04.826 [main] DEBUG o.h.h.internal.ast.tree.FromElement - FromClause{level=1} : test.pandaadb.HibernateTest$A (e) -&gt; list1_
14:45:04.826 [main] DEBUG o.h.hql.internal.ast.tree.FromClause - addJoinByPathMap() : h.list -&gt; FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=e,role=<span class="code-keyword" style="color: #000091">null</span>,tableName=HibernateTest$A,tableAlias=list1_,origin=HibernateTest$Holder hibernatet0_,columns={hibernatet0_.holderId ,className=test.pandaadb.HibernateTest$A}}
14:45:04.826 [main] DEBUG o.h.hql.internal.ast.tree.DotNode - dereferenceCollection() : Created <span class="code-keyword" style="color: #000091">new</span> FROM element <span class="code-keyword" style="color: #000091">for</span> h.list : HibernateTest$A list1_
14:45:04.826 [main] DEBUG o.h.h.i.ast.tree.FromReferenceNode - Resolved : h.list -&gt; .
14:45:04.827 [main] DEBUG o.h.hql.internal.ast.HqlSqlWalker - createFromJoinElement() : -- join tree --
 \-[JOIN_FRAGMENT] FromElement: 'HibernateTest$A list1_' FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=e,role=test.pandaadb.HibernateTest$Holder.list,tableName=HibernateTest$A,tableAlias=list1_,origin=HibernateTest$Holder hibernatet0_,columns={hibernatet0_.holderId ,className=test.pandaadb.HibernateTest$A}}

14:45:04.827 [main] DEBUG o.h.h.i.ast.tree.FromReferenceNode - Resolved : h -&gt; hibernatet0_.holderId
14:45:04.828 [main] DEBUG o.h.h.i.antlr.HqlSqlBaseWalker - select : finishing up [level=1, statement=select]
14:45:04.828 [main] DEBUG o.h.hql.internal.ast.HqlSqlWalker - processQuery() :  ( SELECT ( {select clause} hibernatet0_.holderId ) ( FromClause{level=1} ( HibernateTest$Holder hibernatet0_ HibernateTest$A list1_ ) ) )
14:45:04.832 [main] DEBUG o.h.h.i.ast.util.JoinProcessor - Using FROM fragment [HibernateTest$Holder hibernatet0_]
14:45:04.832 [main] DEBUG o.h.h.i.ast.util.JoinProcessor - Using FROM fragment [left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$A list1_ on hibernatet0_.holderId=list1_.subclassId left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$C list1_1_ on list1_.id=list1_1_.id left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$B list1_2_ on list1_.id=list1_2_.id]
14:45:04.833 [main] DEBUG o.h.h.i.antlr.HqlSqlBaseWalker - select &gt;&gt; end [level=1, statement=select]
14:45:04.833 [main] DEBUG o.h.h.i.ast.QueryTranslatorImpl - --- SQL AST ---
 \-[SELECT] QueryNode: 'SELECT'  querySpaces (HibernateTest$Holder,HibernateTest$A)
    +-[SELECT_CLAUSE] SelectClause: '{select clause}'
    |  +-[ALIAS_REF] IdentNode: 'hibernatet0_.holderId as holderId1_3_0_' {alias=h, className=test.pandaadb.HibernateTest$Holder, tableAlias=hibernatet0_}
    |  +-[SELECT_EXPR] SelectExpressionImpl: 'list1_.id as id1_0_1_' {FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=e,role=test.pandaadb.HibernateTest$Holder.list,tableName=HibernateTest$A,tableAlias=list1_,origin=HibernateTest$Holder hibernatet0_,columns={hibernatet0_.holderId ,className=test.pandaadb.HibernateTest$A}}}
    |  +-[SQL_TOKEN] SqlFragment: 'list1_.subclassId as subclass2_0_1_, list1_1_.prop2 as prop1_2_1_, list1_2_.prop1 as prop1_1_1_, <span class="code-keyword" style="color: #000091">case</span> when list1_1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 1 when list1_2_.id is not <span class="code-keyword" style="color: #000091">null</span> then 2 when list1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 0 end as clazz_1_'
    |  \-[SQL_TOKEN] SqlFragment: 'list1_.subclassId as subclass2_0_0__, list1_.id as id1_0_0__'
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=2, fromElements=2, fromElementByClassAlias=[e, h], fromElementByTableAlias=[hibernatet0_, list1_], fromElementsByPath=[h.list], collectionJoinFromElementsByPath=[], impliedElements=[]}
       \-[FROM_FRAGMENT] FromElement: 'HibernateTest$Holder hibernatet0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=h,role=<span class="code-keyword" style="color: #000091">null</span>,tableName=HibernateTest$Holder,tableAlias=hibernatet0_,origin=<span class="code-keyword" style="color: #000091">null</span>,columns={,className=test.pandaadb.HibernateTest$Holder}}
          \-[JOIN_FRAGMENT] FromElement: 'left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$A list1_ on hibernatet0_.holderId=list1_.subclassId left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$C list1_1_ on list1_.id=list1_1_.id left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$B list1_2_ on list1_.id=list1_2_.id' FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=e,role=test.pandaadb.HibernateTest$Holder.list,tableName=HibernateTest$A,tableAlias=list1_,origin=HibernateTest$Holder hibernatet0_,columns={hibernatet0_.holderId ,className=test.pandaadb.HibernateTest$A}}

14:45:04.833 [main] DEBUG o.h.hql.internal.ast.ErrorCounter - throwQueryException() : no errors
14:45:04.838 [main] DEBUG o.h.h.i.ast.QueryTranslatorImpl - HQL: SELECT h from test.pandaadb.HibernateTest$Holder h LEFT JOIN FETCH TREAT (h.list AS HibernateTest$B) e
14:45:04.838 [main] DEBUG o.h.h.i.ast.QueryTranslatorImpl - SQL: select hibernatet0_.holderId as holderId1_3_0_, list1_.id as id1_0_1_, list1_.subclassId as subclass2_0_1_, list1_1_.prop2 as prop1_2_1_, list1_2_.prop1 as prop1_1_1_, <span class="code-keyword" style="color: #000091">case</span> when list1_1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 1 when list1_2_.id is not <span class="code-keyword" style="color: #000091">null</span> then 2 when list1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 0 end as clazz_1_, list1_.subclassId as subclass2_0_0__, list1_.id as id1_0_0__ from HibernateTest$Holder hibernatet0_ left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$A list1_ on hibernatet0_.holderId=list1_.subclassId left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$C list1_1_ on list1_.id=list1_1_.id left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$B list1_2_ on list1_.id=list1_2_.id
14:45:04.838 [main] DEBUG o.h.hql.internal.ast.ErrorCounter - throwQueryException() : no errors
14:45:04.846 [main] DEBUG org.hibernate.SQL - select hibernatet0_.holderId as holderId1_3_0_, list1_.id as id1_0_1_, list1_.subclassId as subclass2_0_1_, list1_1_.prop2 as prop1_2_1_, list1_2_.prop1 as prop1_1_1_, <span class="code-keyword" style="color: #000091">case</span> when list1_1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 1 when list1_2_.id is not <span class="code-keyword" style="color: #000091">null</span> then 2 when list1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 0 end as clazz_1_, list1_.subclassId as subclass2_0_0__, list1_.id as id1_0_0__ from HibernateTest$Holder hibernatet0_ left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$A list1_ on hibernatet0_.holderId=list1_.subclassId left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$C list1_1_ on list1_.id=list1_1_.id left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$B list1_2_ on list1_.id=list1_2_.id
Hibernate: select hibernatet0_.holderId as holderId1_3_0_, list1_.id as id1_0_1_, list1_.subclassId as subclass2_0_1_, list1_1_.prop2 as prop1_2_1_, list1_2_.prop1 as prop1_1_1_, <span class="code-keyword" style="color: #000091">case</span> when list1_1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 1 when list1_2_.id is not <span class="code-keyword" style="color: #000091">null</span> then 2 when list1_.id is not <span class="code-keyword" style="color: #000091">null</span> then 0 end as clazz_1_, list1_.subclassId as subclass2_0_0__, list1_.id as id1_0_0__ from HibernateTest$Holder hibernatet0_ left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$A list1_ on hibernatet0_.holderId=list1_.subclassId left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$C list1_1_ on list1_.id=list1_1_.id left <span class="code-keyword" style="color: #000091">outer</span> join HibernateTest$B list1_2_ on list1_.id=list1_2_.id
14:45:04.848 [main] DEBUG org.hibernate.loader.Loader - Result set row: 0
14:45:04.848 [main] DEBUG org.hibernate.loader.Loader - Result row: EntityKey[test.pandaadb.HibernateTest$Holder#cee5414c-6d12-4080-994c-eb2c8b2721c9], EntityKey[test.pandaadb.HibernateTest$A#69d1383a-3b88-4781-b894-03f226f40e52]
14:45:04.848 [main] DEBUG org.hibernate.loader.Loader - Found row of collection: [test.pandaadb.HibernateTest$Holder.list#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.848 [main] DEBUG org.hibernate.loader.Loader - Result set row: 1
14:45:04.848 [main] DEBUG org.hibernate.loader.Loader - Result row: EntityKey[test.pandaadb.HibernateTest$Holder#cee5414c-6d12-4080-994c-eb2c8b2721c9], EntityKey[test.pandaadb.HibernateTest$A#26e18799-8fce-4e74-8236-bcbfad1d15ab]
14:45:04.849 [main] DEBUG org.hibernate.loader.Loader - Found row of collection: [test.pandaadb.HibernateTest$Holder.list#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.849 [main] DEBUG org.hibernate.loader.Loader - Result set row: 2
14:45:04.849 [main] DEBUG org.hibernate.loader.Loader - Result row: EntityKey[test.pandaadb.HibernateTest$Holder#cee5414c-6d12-4080-994c-eb2c8b2721c9], EntityKey[test.pandaadb.HibernateTest$A#f9e43150-f1a3-4112-8059-2f785aa8d5d7]
14:45:04.849 [main] DEBUG org.hibernate.loader.Loader - Found row of collection: [test.pandaadb.HibernateTest$Holder.list#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Resolving associations <span class="code-keyword" style="color: #000091">for</span> [test.pandaadb.HibernateTest$Holder#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Done materializing entity [test.pandaadb.HibernateTest$Holder#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Resolving associations <span class="code-keyword" style="color: #000091">for</span> [test.pandaadb.HibernateTest$A#69d1383a-3b88-4781-b894-03f226f40e52]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Done materializing entity [test.pandaadb.HibernateTest$A#69d1383a-3b88-4781-b894-03f226f40e52]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Resolving associations <span class="code-keyword" style="color: #000091">for</span> [test.pandaadb.HibernateTest$B#26e18799-8fce-4e74-8236-bcbfad1d15ab]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Done materializing entity [test.pandaadb.HibernateTest$B#26e18799-8fce-4e74-8236-bcbfad1d15ab]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Resolving associations <span class="code-keyword" style="color: #000091">for</span> [test.pandaadb.HibernateTest$C#f9e43150-f1a3-4112-8059-2f785aa8d5d7]
14:45:04.849 [main] DEBUG o.h.engine.internal.TwoPhaseLoad - Done materializing entity [test.pandaadb.HibernateTest$C#f9e43150-f1a3-4112-8059-2f785aa8d5d7]
14:45:04.849 [main] DEBUG o.h.e.l.i.CollectionLoadContext - 1 collections were found in result set <span class="code-keyword" style="color: #000091">for</span> role: test.pandaadb.HibernateTest$Holder.list
14:45:04.849 [main] DEBUG o.h.e.l.i.CollectionLoadContext - Collection fully initialized: [test.pandaadb.HibernateTest$Holder.list#cee5414c-6d12-4080-994c-eb2c8b2721c9]
14:45:04.849 [main] DEBUG o.h.e.l.i.CollectionLoadContext - 1 collections initialized <span class="code-keyword" style="color: #000091">for</span> role: test.pandaadb.HibernateTest$Holder.list
test.pandaadb.HibernateTest$A
test.pandaadb.HibernateTest$B
test.pandaadb.HibernateTest$C
test.pandaadb.HibernateTest$A
test.pandaadb.HibernateTest$B
test.pandaadb.HibernateTest$C
test.pandaadb.HibernateTest$A
test.pandaadb.HibernateTest$B
test.pandaadb.HibernateTest$C
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">I think the repetition of the objects is due to the nature of the join, however you can see that all objects regardless of the type defined are represented. </p> <p style="margin: 10px 0 0">vs, with the WHERE clause I get:</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">
test.pandaadb.HibernateTest$B
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">Regards,</p> <p style="margin: 10px 0 0">Artur</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"> 
                                        <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-10887#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-be15718f-eb83-44c9-ae7c-53ce53922000" 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-10887#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-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">(v1000.110.0#100004-<span title="4011b0e04c4c38bb2dee6e07fcb100e257c24f2c" data-commit-id="4011b0e04c4c38bb2dee6e07fcb100e257c24f2c}">sha1:4011b0e</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"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-ec5e05fc-7a46-47ed-9c92-9b9c07a21eb1" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>