import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.mxchange.jshopcore.model.category.Category;
+import org.mxchange.jshopcore.model.category.ProductCategory;
/**
* Generic product class
* Product productCategory
*/
@Basic (optional = false)
- @Column (name = "category_id", length = 20, nullable = false)
+ @JoinColumn(name = "category_id", nullable = false, updatable = false)
+ @OneToOne(targetEntity = ProductCategory.class, optional = false)
private Category productCategory;
/**