-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: is it good approach if we use embedded entity classes
PostPosted: Wed Feb 26, 2014 7:00 am 
Newbie

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.