My team and I have been struggling with situations where a member object of a class might be null.
Class B might never get populated. Our DB designer says A is the parent of B so B should have a foreign key reference to A. We can't seem to map this using one-to-one. We have tried many-to-one from A to B with unique="true" doesn't work if we have As without Bs (NULL violates uniqueness constraint). The only thing that I can see is the one-to-one using a primary key association, which would make the primary key in B match that of A. However, my DB guy really wants the foreign key relationship to be visible.
for parent-child relationships between tables hibernate typically has a <subclass> XML mapping element. That again drills down to two conditions. Whether the parent child relationships are in a single table(something like manager-employee, Cat-kittens) or two different tables (Car - benz, human - Samuel Cox). you can map both of these relationships using hibernate.
If you are not laughing at yourself, then you just didn't get the joke.