BAEL-2857 Defining a JPA Entity - changed the table name

This commit is contained in:
Vivek 2019-05-04 15:31:50 +05:30
parent 8271d0ab5a
commit dd877c6b2c

View File

@ -17,13 +17,13 @@ import javax.persistence.Transient;
import com.baeldung.util.Gender; import com.baeldung.util.Gender;
@Entity @Entity
@Table(name="STUD") @Table(name="STUDENT")
public class Student { public class Student {
@Id @Id
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(strategy = GenerationType.AUTO)
private Long id; private Long id;
@Column(name = "STUD_NAME", length = 50, nullable = false, unique = false) @Column(name = "STUDENT_NAME", length = 50, nullable = false, unique = false)
private String name; private String name;
@Transient @Transient
private Integer age; private Integer age;