JPA Flashcards

1
Q

Add the JPA annotations @Entity, @Table, @Column, @Id to the following
Java Bean class:

public class Supplier
{
private int id;
private String name;
private String description;
}
A
@Entity
@Table(name = "supplier_table")
public class Supplier
{
@Id
@Column(name = "ID")
private int id;

@Column(name = “Name”)
private String name;

@Column(name = “Description”)
private String description;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly