1 package myorg.relex.one2many;
2
3 import javax.persistence.*;
4 /**
5 * This class is an example of the many side of a one-to-many, uni-directional relationship
6 * which uses orphanRemoval of target entities on the many side. This entity exists for the
7 * sole use of the one side of the relation.
8 */
9 @Entity
10 @Table(name="RELATIONEX_TODO")
11 public class Todo {
12 @Id @GeneratedValue
13 private int id;
14
15 @Column(length=32)
16 private String title;
17
18 public Todo() {}
19 public Todo(String title) {
20 this.title = title;
21 }
22
23 public int getId() { return id; }
24
25 public String getTitle() { return title; }
26 public void setTitle(String title) {
27 this.title = title;
28 }
29 }