What is the best way to create a 1-0..1 mapping?
I have an object of type servicecategory, which contains a collection (1-m) of servicetypes, which have a 1-1 with a service, which can be of any derived service type, one of which has a 1-0..1 relationship to a path. (Don't ask, no way to make it any simpler).
I have currently mapped this last relationship as a 1-1, but the session.find("ServiceCategory sc where serviceCat.code=?") falls over if there was no path. It works fine if there is a path.
|