bjorntj wrote:
I have a book that says one-to-one association needs to be bidirectional, is this correct? Even if I always load from one side of the relation?
Regards,
BTJ
All depends from which side you are loading. If you are loading in the object that maps to the table with the foreign key, then you only have to do it on that side. If however, you wish to load that object into the object to which that foreign key maps, then you have to do it on both sides. This latter case, though it tends to make more sense in regard to the relationship, feels nothing short of a hack. Perhaps in H4 this will be corrected.