I have a UserType and inside of nullSafeGet() I need access to other fields in the containing entity. So I figured that I could cast the "owner" param that is passed in and voila - my issues are gone. Unfortunately the other fields in the "owner" containing entity have not yet been loaded and they are null. Has anyone come across this or needed to control the load order of specific fields?
Thanks,
Chris
P.S. Just for some background I have an int status that I want to be able to pull an I18N string description from - as described in the article
http://www.theserverside.com/news/threa ... d_id=27171. The only difference is that I need both the int status and the string desc (ie the string desc depends on the int status, not just a string lookup key)
Hibernate version: 2.1
Mapping documents:
<id name="surrogate" column="surrogate_id" type="long">
<generator class="native"/>
</id>
<version name="version" type="int" column="version"/>
<property name="startTime" type="timestamp"/>
<property name="statusDesc" type="com.foo.CustomType"/>
Code between sessionFactory.openSession() and session.close():
NA
Full stack trace of any exception that occurs:
NA
Name and version of the database you are using:
NA
The generated SQL (show_sql=true):
NA
Debug level Hibernate log excerpt:
NA