From c6fa6180a1e98a7c37492b2482f9a30e3b782793 Mon Sep 17 00:00:00 2001
From: Roland Haeder <roland@mxchange.org>
Date: Tue, 29 Sep 2015 09:16:40 +0200
Subject: [PATCH] =?utf8?q?fixed=20referenced=20table=20Signed-off-by:Rolan?=
 =?utf8?q?d=20H=C3=A4der=20<roland@mxchange.org>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 .../mxchange/jshopcore/model/product/GenericProduct.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/org/mxchange/jshopcore/model/product/GenericProduct.java b/src/org/mxchange/jshopcore/model/product/GenericProduct.java
index 99ba27c..e9ac607 100644
--- a/src/org/mxchange/jshopcore/model/product/GenericProduct.java
+++ b/src/org/mxchange/jshopcore/model/product/GenericProduct.java
@@ -23,8 +23,11 @@ import javax.persistence.Entity;
 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
@@ -51,7 +54,8 @@ public class GenericProduct implements Product, Comparable<Product> {
 	 * 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;
 
 	/**
-- 
2.39.5