-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: one-to-many set
PostPosted: Fri Jun 01, 2007 1:41 pm 
Newbie

Joined: Mon Aug 28, 2006 4:09 pm
Posts: 6
I have this simple schema:

Code:

    <class
        name="entidades.test.Sistema"
        table="sistema"
        schema="test"
    >
       
        <id
            name="codigo"
        >
            <generator class="assigned">
            </generator>
           
        </id>
       
        <set name="aplicacoes">
            <key column="cod_sistema"/>       
            <one-to-many class="entidades.test.Aplicacao"/>
        </set>
       
    </class>

    <class
        name="entidades.test.Aplicacao"
        table="aplicacao"
        schema="test"
    >
       
        <composite-id
            name="pk"
            class="entidades.test.Aplicacao_pk"
        >
           
            <key-many-to-one
                name="sistema"
                class="entidades.test.A"
                column="cod_sistema"                               
            />
           
            <key-property
                name="codigo"               
            />
           
        </composite-id>
    </class>


the entity 'entidades.test.Sistema' has an only collection, but in the log show:

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


and this collection does not have elements, but in the log show:

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 }]


the collection is not loaded although in log to show the the opposite, some one can help?!

Fred


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.