vlad wrote:
Unless you explicitly added a 2nd level cache provider and configured your entities to be cached, Hibernate will not use the 2nd level caching mechanism.
Alright.
Could you kindly advise me if my mapping is correct ?
Code:
@Entity (name = "tutor")
@Table(name = "tutor")
public class Tutor implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = javax.persistence.GenerationType.IDENTITY)
@Column(name="tutor_id")
private int tutor_id;
//public Tutor(String name2, String nRIC2, String email2, String address12, String address22, String zipcode2, String contactNo2, int age2, String qualification2, String qualificationDetail2, String budget2, String remark2) {}
public Tutor(String name, String NRIC, String gender, String[] subjMany, String address1, String address2, String zipcode, int age, String qualification, String qualificationDetail, String contactNo, String email, String budget, String remark){
this.name = name;
this.NRIC = NRIC;
this.gender = gender;
this.subjMany = subjMany;
this.address1 = address1;
this.address2 = address2;
this.zipcode = zipcode;
this.age = age;
this.contactNo = contactNo;
this.email = email;
this.qualification = qualification;
this.qualificationDetail = qualificationDetail;
this.budget = budget;
this.remark = remark;
}
The rest of the fields are all the same
@Column(name="tutorQualification")
@NotNull
private String qualification;
@Column(name="tutorQualficationDetail", nullable = false)
@NotNull
private String qualificationDetail;
Thanks again for your help.