-->
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: order of onPostLoad event firing
PostPosted: Tue Mar 20, 2007 11:10 am 
Newbie

Joined: Thu Jan 11, 2007 8:15 am
Posts: 2
We use Hibernate 3.x in a Spring application. I have a problem with the order in which the onPostLoad events are being fired. I have an entity called Customer, that contains two other entities Address and Contract Both are a OneToOne relation using the @OneToOne annotation. The Contract entity contains one entity called BankAccount, also as a OneToOne relation. When I load a Customer, the onPostLoad events are fired in this order:

Address
Contract
BankAccount
Customer

which almost makes sense, but the Contract cannot be fully loaded until the loading of the BankAccount has finished. When I look at the Contract entity during the onPostLoad event, the BankAccount within the Contract is there, but it has only the ID populated - all of its fields are set to NULL (yet).

To my understanding, the order should look like:

Address
BankAccount
Contract
Customer

Am I overlooking something?


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.