Joined: Fri Feb 14, 2014 4:09 am Posts: 1
|
Hi All,
i have one double currently we used embedded object like :
employee table empid
loantable loanid
jointable empi loanid
in join table i did not use primary key for entity class . so we used total there four classes
employee class{ Set<Loads> loans=new HashSet<Load>(); } Loan class{
} JoinTable class{
JoinTableId id;
}
JoinTableId class{
Employee employee; Loan loan }
if we use primary key for jointable uses only three classes
JoinTable{ long primarykey; Employee emp; Loan loan; }
my double is which is better approach could you please suggest me ?
Thanks Naresh
|
|