tenwit wrote:
I had a little dificulty parsing that. Do you want Field.getParent() to return only the OID of the parent, and not the parent object? If you do, then eliminiate the many-to-one mapping and use a component. If you want to be able to access the parent's OID directly from the current Field object, then you could add getParentOID to the Field class (but not to the mapping); that would return getParent().getOid(). And if you change your parent fetch strategy to "join" (which incurs basically no overhead on classes this small), then the parent's OID will always be available without having to issue another select statement.
Well/yes, I simply want the current Field object return the OID of the parent: Field.getParentOid should return the class myorg.as.jlibs.oid.Oid with data/columns fld_parent_high+fld_parent_low.
I think it should be possible to declare such a property in the Hibernate mapping :-)