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.
|