package com.testdb.model; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; @Entity @Table(name = "language") public class Language { @Id @Column(name = "language_id") private long id; private String name; @OneToMany(mappedBy = "lang") private List film; public void setId(long id) { this.id = id; } public long getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List getFilm() { return film; } public void setFilm(List film) { this.film = film; } @Override public String toString() { // TODO Auto-generated method stub return name; } }