For whatever reason, there exists 2 tables LOC (Location - Key Location_Key:LONG) and LOC_ATTR (Location Attributes - Key Location_Attr_Key:LONG) with a one-to-one association, in the sense that one row in LOC table has one and only one row in LOC_ATTR table [sigh!]. Add to that, the only way to index into LOC_ATTR is through Loc_Code:STRING (1 Location_Key = 1 Loc_Code in LOC table). Why Location_key wasn't used in LOC_ATTR is beyond my understanding .. and I cannot change the table structures!
LOC table:Code:
Location_Key : LONG
Loc_Code : STRING
. . . more data . . .
LOC_ATTR table:Code:
Location_Attr_Key : LONG
Loc_Code : STRING
. . . more data . . .
Question is this, how do I get LOC and LOC_ATTR using Hibernate? Please help!