]> git.mxchange.org Git - jproduct-core.git/blobdiff - src/org/mxchange/jshopcore/model/customer/ShopCustomer.java
@JoinColumn and @Column doesn't work together
[jproduct-core.git] / src / org / mxchange / jshopcore / model / customer / ShopCustomer.java
index 678cbb88e43382d38984fbbe47883e1c3ced8edd..42811374a2be73cc0f4a8c40ae1861634f6915e1 100644 (file)
@@ -56,9 +56,8 @@ public class ShopCustomer implements Customer {
        /**
         * Id number from "contacts" table
         */
-       @JoinColumn (table = "contacts", unique = true)
+       @JoinColumn (table = "contacts", referencedColumnName = "customer_contact_id", name = "id", nullable = false, updatable = false, unique = true)
        @OneToOne (optional = false, targetEntity = BaseContact.class, orphanRemoval = true)
-       @Column (name = "customer_contact_id", nullable = false, length = 20)
        private Contact contact;
 
        /**