This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've looked around and can't seem to find a solution to my issue so please read on to see what it is. Any help much appreciated.
* I've got table A which contains an 'Id' column (but table A has no reference to any column in table B)
* I have table B which contains a column called 'table_A_ID' which maps to the 'Id' column of table A.
* There is a 1 to 1 mapping between rows in table A and table B.
My question concerns how I get instances of B onto instances of A (since there's no reference to B on A in the DB)? I think I need to use joins but don't know what annotations I need to use to do this kind of 'reverse lookup'?