-->
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.  [ 3 posts ] 
Author Message
 Post subject: Weird behavior - frequently hangs on a one-to-one mapping
PostPosted: Fri Feb 06, 2004 3:28 am 
Newbie

Joined: Tue Jan 13, 2004 12:13 pm
Posts: 8
Location: USA
I have the following mapping:

Code:
    <class name="Run">

        <id name="id" column="run_id">
            <generator class="seqhilo">
               <param name="sequence">run_id_seq</param>
               <param name="max_lo">10</param>
            </generator>
        </id>

        <version name="version" />
       
        <property name="runTypeId" column="run_type_id" />

    </class>

    <class name="MsRun" table="ms_run">
   
        <id name="id" column="run_id">
            <generator class="assigned">
            </generator>
        </id>

        <version name="version" />
       
        <one-to-one name="requestedRun" class="Run" constrained="true" />

    </class>


The run table above is polymorphically associated to a few tables and ms_run is one of them. But I only need an association property in MsRun and hence I used the one-to-one. I tried the foreign generator but got an error and so I switch to assigned.

Anyway, this mapping works fine a few times and then it hangs on an update (probably from an internal flush 'cause I am not updating / flushing / commiting) to the run table. Its strange that its doing an update 'cause I don't have any transient/dirty objects referenced from the persistent objects. This is a query-only session, so I have not started a transaction.

My instincts point to the mapping, but I have no clue how to fix it. My last option is to run it through the debugger but am concerned about all the code generation that may prevent/hinder it.

I am pretty much stuck, so any help would be greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 06, 2004 5:00 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Please reformulate using these advice http://www.hibernate.org/ForumMailinglists/HowToAskForHelp

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 06, 2004 10:24 am 
Newbie

Joined: Tue Jan 13, 2004 12:13 pm
Posts: 8
Location: USA
Sorry, it was 2 in the morning here and I wasn't thinking. But anyway, this morning eveything seems to be working fine. And I don't see any update statements at all. I shall repost it under a different topic if it reappears. Thanks.


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

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.