我试图使用下面的方法删除多行,但这是一个例外。 如果有任何其他替代方案可以做同样的工作,请建议。
deleteByCompositIdIn(List<CompositId> compositIdList)
<----- CompositId class given below ---->
@Embeddable
public class CompositId {
@Column(name="empFirstName")
private String empFirstName;
@Column(name="empId")
private int empId;
public String getEmpFirstName() {
return empFirstName;
}
public void setEmpFirstName(String empFirstName) {
this.empFirstName = empFirstName;
}
public int getEmpId() {
return empId;
}
public void setEmpId(int empId) {
this.empId = empId;
}
}
但低于异常
failed: javax.persistence.TransactionRequiredException: No transactional EntityManager available