Anthony,
thanks for the reply.
yes, I see the data is wrong in my db (that is ok by itself), I just want to log some info about the issue. My mapping looks like this:
<class name="Parent" table="Parent">
...
<many-to-one name="host" class="HostnameMap" column="filesystemID" outer-join="auto"/>
</class>
I have an instance of Parent, and the exception was thrown when I called parent.getHost();
What I want at that point is to be able to:
System.err.println("Bad data in db: " + parent.getId() + " has host: " + <THE ID OF THE HOST>);
I cannot see how to get the id, without getting the HostnameMap instance, which is unexistant thus the exception...
many thanks,
a plus,
|