Bael 2812 jpa basic annotation (#6922)

* BALE-2812 : JPA Basic Annotation

* BAEL-2812 : JPA Basic Annotation moving code

* BAEL-2812 : Removing changes from hibernate5 module

* BAEL-2812 : Moving files to java-jpa
This commit is contained in:
Shubhra Srivastava
2019-05-10 09:42:58 +05:30
committed by maibin
parent e1c354f9df
commit a7f347194b
2 changed files with 89 additions and 0 deletions
@@ -0,0 +1,33 @@
package com.baeldung.jpa.basicannotation;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
@Entity
public class Course {
@Id
private int id;
@Basic(optional = false, fetch = FetchType.LAZY)
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}