Thanks for reply McKenzie. Let me try to explain it more.
I have 2 entities - Property and Unit
Units can exist in isolation as well, through the Admin interface I can add more units. Later on I can link one or more Properties to their respective unit (only one unit per property). So, to Admin module Unit is directly accessible, hence I cannot always embed it in property.
On the other hand, for user module, unit exists only with Property object and they don't know unitid, they should directly get unit-description, I won't like to code it like below:
propObject.getUnit().getDescription();
Instead I would like to code like this:
propObject.getUnit();//which should return me unit description
I understand that with hibernate or other persistence framework, I can define relation between property and unit and load units along with property. But my question is if I am using plain
JDBC, where should I write the code for loading unit description from database? I am trying to understand it in old DAO world, not with hibernate.