public class ProductInfo
private String productInfoId;
@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name = "ProductInfoId")
private List<Size> sizeList=new ArrayList<Size>();
}
public class Size{
private SizePK key;
}
@Embeddable
public class SizePK
{
private String productInfoId;
private String sizeDetails;
}
SIZE(ProductInfoId, productInfoId, sizeDetails)
05.03.2013 20:20:45.092 WARN [main] org.hibernate.util.JDBCExceptionReporter SQL 错误:1110,SQLState:42000 05.03.2013 20:20:45.092错误[main] org.hibernate.util.JDBCExceptionReporter 列 'productInfoId'指定两次