Skip to content

Instantly share code, notes, and snippets.

Last active June 30, 2017 11:23
What would you like to do?
public class SocialMediaSite {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
private String description;
@OneToMany(mappedBy = "socialMediaSite", cascade = CascadeType.ALL, orphanRemoval = true)
private List<User> users = new ArrayList<>();
//Other details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment