Hello dear users,
At first sorry please for my very simple question, but as a beginner in hibernate world I need your help.
I have a class with annotation and want to get data from data base.
Code:
@Entity
@Table(name = "name")
public myClass {
@Id @GeneratedValue
@Column(name = "id")
private int id;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
here getters and setters
}
I have configured data base connection (mysql) application context etc…
Just don’t know how to get name and last name from data base table name.
Could someone help me please?
Thanks in advance