Sector entities, corporate entities, they have a relationship between,
DeptDoc
private int id;
Private String department;
EntDoc
Private int entid;
Private String entname;
There are three types of associated design:
A, ID associated company entity class,
Dept
private int id;
Private String department;
Private String entid;
Second, the company objects to associations,
Dept
private int id;
Private String department;
Private entDoc ent;
CodePudding user response:
Not what not good, complexity is the same, mainly depends on how you code architecture design, with the responsibility of each layer is the best