I am using JPA 2.1 with Hibernate 4.3.x on Glassfish 4, also tried the suggestion listed at https://coderwall.com/p/e5fxrw still get the below error. Could some one let me know what might be the issue ?
javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.dstar.entity.PurchaseOrder.idpurchaseorder
Below is the entity code, skipped getter and setter methods:
@Entity
@Table(name="purchaseorder")
@PersistenceUnit(name="dstarwarehouse",unitName="dstarwarehouse")
public class PurchaseOrder implements Serializable{
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private int idpurchaseorder;
private boolean cash;
private boolean credit;
private String supplier;
private String orderedBy;
private String submittedBy;
private String approvedBy;
private Date expectedDate;
private Date creationDate;
private Date submittedDate;
private Date approvalDate;
private String purchaserName;
private double total;
@JoinColumn(name="idpurchaseorder", referencedColumnName="idpurchaseorder")
private List<Part> parts;
}