[Hibernate]one-to-many

Opa,
pessoal eu jah tentei postar no fórum do Hibernate…sem sucesso. Talvez alguem aki consiga me ajudar.

[code]
<class
name="entidades.test.Sistema"
table="sistema"
schema="test"
>

    &lt;id
        name=&quot;codigo&quot;
    &gt;
        &lt;generator class=&quot;assigned&quot;&gt;
        &lt;/generator&gt;
       
    &lt;/id&gt;
   
    &lt;set name=&quot;aplicacoes&quot;&gt;
        &lt;key column=&quot;cod_sistema&quot;/&gt;       
        &lt;one-to-many class=&quot;entidades.test.Aplicacao&quot;/&gt;
    &lt;/set&gt;
   
&lt;/class&gt;

&lt;class
    name=&quot;entidades.test.Aplicacao&quot;
    table=&quot;aplicacao&quot;
    schema=&quot;test&quot;
&gt;
   
    &lt;composite-id
        name=&quot;pk&quot;
        class=&quot;entidades.test.Aplicacao_pk&quot;
    &gt;
       
        &lt;key-many-to-one
            name=&quot;sistema&quot;
            class=&quot;entidades.test.A&quot;
            column=&quot;cod_sistema&quot;                               
        /&gt;
       
        &lt;key-property
            name=&quot;codigo&quot;               
        /&gt;
       
    &lt;/composite-id&gt;
&lt;/class&gt; [/code]

A entidade ‘entidades.test.Sistema’ tem uma colecao, mas no log aperece:

14:18:33,609 DEBUG CollectionLoadContext:262 - 2 collections were found in result set for role: entidades.test.Sistema.aplicacoes
14:18:33,610 DEBUG CollectionLoadContext:206 - collection fully initialized: [entidades.test.Sistema.aplicacoes#TESTE ]
14:18:33,610 DEBUG CollectionLoadContext:206 - collection fully initialized: [entidades.test.Sistema.aplicacoes#TESTE]
14:18:33,611 DEBUG CollectionLoadContext:272 - 2 collections initialized for role: entidades.test.Sistema.aplicacoes

e qndo eu acesso a colecao ela esta vazia apesar d log mostrar q carregou uma entidade…

14:18:33,530 DEBUG Loader:687 - result set row: 0
14:18:33,530 DEBUG StringType:122 - returning 'TESTE ’ as column: cod1_1_0_
14:18:33,531 DEBUG StringType:122 - returning 'TESTEAP ’ as column: codigo1_0_
14:18:33,537 DEBUG DefaultLoadEventListener:153 - loading entity: [entidades.test.Sistema#TESTE ]
14:18:33,538 DEBUG DefaultLoadEventListener:230 - creating new proxy for entity
14:18:33,565 DEBUG Loader:1164 - result row: EntityKey[entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]
14:18:33,566 DEBUG Loader:1347 - Initializing object from ResultSet: [entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]
14:18:33,567 DEBUG AbstractEntityPersister:1860 - Hydrating entity: [entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]
14:18:33,568 DEBUG StringType:122 - returning 'TESTE ’ as column: cod1_1_
14:18:33,568 DEBUG Loader:972 - found row of collection: [entidades.test.Sistema.aplicacoes#TESTE ]
14:18:33,569 DEBUG CollectionLoadContext:100 - new collection: instantiating
14:18:33,570 DEBUG StringType:122 - returning 'TESTE ’ as column: cod1_1_
14:18:33,571 DEBUG StringType:122 - returning 'TESTEAP ’ as column: codigo1_
14:18:33,571 DEBUG DefaultLoadEventListener:153 - loading entity: [entidades.test.Sistema#TESTE ]
14:18:33,573 DEBUG DefaultLoadEventListener:196 - entity proxy found in session cache
14:18:33,574 DEBUG DefaultLoadEventListener:153 - loading entity: [entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]
14:18:33,574 DEBUG DefaultLoadEventListener:304 - attempting to resolve: [entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]
14:18:33,575 DEBUG DefaultLoadEventListener:313 - resolved object in session cache: [entidades.test.Aplicacao#component[sistema,codigo]{codigo=TESTEAP , sistema=entidades.test.Sistema#TESTE }]

Fred :mad: