Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- @Table(name = "celebrities")
- @Data
- public class CelebrityEntity {
- @Id
- @Column(updatable = false)
- @GeneratedValue
- private Long id;
- @Column(name = "name_lastname", nullable = false)
- private String nameLastName;
- @ManyToMany(mappedBy = "director")
- private List<MovieEntity> moviesByDirector;
- @ManyToMany(mappedBy = "writer")
- private List<MovieEntity> moviesByWriter;
- }
Add Comment
Please, Sign In to add comment