-->
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: Problem with the order that CGLIB uses to fill my object
PostPosted: Sun Apr 10, 2005 4:23 am 
Newbie

Joined: Mon Jan 12, 2004 10:06 am
Posts: 15
Hi all!

I'm using Hibernate3 and Im having a problem when Im loading an object with HQL. This object have a List in it and this list is set to fetch="join" and lazy="true". Using Eclipse debugger, when Hibernate retrieve my object it has a list in it with two elements, but when CGLIB puts values into my final object, the order in which it does that is like (the CGLIB object has an array with the properties to set):

[MyList]
[MyPrimaryKey]
[OtherProperty]

My problem is that my legacy Systems do aditionals operations when we modify the primarykey of an object (for example, clean of internal objects, like the list in this case). Hibernate (or CGLIB) puts my list before the primarykey, so when the primarykey is set, I loose my list.

Can I control the order in which CGLIB puts properties returned by Hibernate into my objects? Or is there any way to solve this behaviour?

Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 1:13 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Try "field access" in mapping, it must not invoke setter.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 11:55 am 
Newbie

Joined: Mon Jan 12, 2004 10:06 am
Posts: 15
Hi again and thanks for your reply

I think this is a bad solution for me, because I cant loose the logic associated to an id change. What I need (I think) is a way to get the values which are part of my primaryKey loaded first than the others.

Thanks again


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.