Hi all,
I've been scratching my head with this for a number of hours to no avail.
Hibernate 3.1.3 / Mac OS X / JDK 1.4
Here's the problem I can't solve:
I have a UserType which resolves int column values to specific instances of a type (call it Foo) internal to our app.
When Foo is 5, nullSafeGet() returns Foo.CAR or Foo.BIKE depending on the owning entity (These are public static final's a la enumeration pattern).
Is there any way to get the owner of the property we're nullSafeGet()ing?
Consider if I have two mappings which map to two classes. Both mappings have one column of this usertype. I want to return a value based on the whether nullSafeGet() is being called in the context of one, or the other. The owner property in nullSafeGet() seems to never be set.
Secondly - is there any way to fetch the name of the property nullSafeGet() is populating? I know this is a bit of a long shot.
If there's anything unclear here, please let me know
JC
|