[Solved] Using relationships like @OneToMany, @ManyToOne in hibernate is good practice or not? [closed]
Regardless of good practice, the point here is you have two options to model this: Elect to manually assign the Department‘s Id on the Employee. Associate the new Employee with an existing Department entity at save. Which you pick really depends on a number of factors. Often the former is chosen when working with legacy … Read more