I am trying to create an objectdb using JPA. The following code below is what i have done but am not sure if i have done it correctly. The entity is student and the attributes are fristname, surname etc. Would anyone know if i have set it out right of if its wrong?
package Student;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.*;
@Entity
public class students implements Serializable {
private static final long serialVersionUID = 1L;
@studentid @GeneratedValue
private long id;
}
public class studentdetails {
int studentid;
String firstname;
String surname;
char gender;
Date dob;
String address1;
String address2;
String address3;
char postcode;
int phonenumber;
int courseid;
}