Skip to content

Instantly share code, notes, and snippets.

@vinchauhan
Created October 16, 2017 05:15
Show Gist options
  • Save vinchauhan/3a2582d1c5dc7dd44170d8041ec51ba3 to your computer and use it in GitHub Desktop.
Save vinchauhan/3a2582d1c5dc7dd44170d8041ec51ba3 to your computer and use it in GitHub Desktop.
@Entity
public class Project {
@Id
@GeneratedValue
private Long id;
private String name, description;
@OneToMany(mappedBy = "project")
private List<Developer> developers;
private Project() {
}
public Project(String name, String description, List<Developer> developers) {
this.name = name;
this.description = description;
this.developers = developers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment