foreign key « EJB « JPA Q&A





1. EJB3 / hibernate and foreign keys in mysql    forum.hibernate.org

@Entity @Table(name="USER") public class User implements Serializable { ... id ... protected Car fashionCar; @OneToOne public Car getFashionCar() { return fashionCar; } public void setFashionCar(Car fashionCar) { ...