]> git.mxchange.org Git - jaddressbook-core.git/blobdiff - src/org/mxchange/jaddressbookcore/model/addressbook/entry/UserAddressbookEntry.java
No, was not working ... :-(
[jaddressbook-core.git] / src / org / mxchange / jaddressbookcore / model / addressbook / entry / UserAddressbookEntry.java
index aa005448522233b5cb7ca89bf5785545d820b799..c2396f72b3cd5344578be90981b65fb0c3b0bf2a 100644 (file)
@@ -33,8 +33,11 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.UserAddressbook;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.UserContact;
 import org.mxchange.jcontactsbusiness.BusinessContact;
+import org.mxchange.jcontactsbusiness.CompanyContact;
 
 /**
  * A POJO for address book entries
@@ -60,7 +63,7 @@ public class UserAddressbookEntry implements AddressbookEntry {
         * Connection to table "business_contacts" (commercial contacts)
         */
        @JoinColumn (name = "entry_business_contact_id", updatable = false)
-       @OneToOne (targetEntity = BusinessContact.class, cascade = CascadeType.REFRESH)
+       @OneToOne (targetEntity = CompanyContact.class, cascade = CascadeType.REFRESH)
        private BusinessContact addressbookEntryBusinessContact;
 
        /**
@@ -83,14 +86,14 @@ public class UserAddressbookEntry implements AddressbookEntry {
         * Connection to table "contacts" (private contacts)
         */
        @JoinColumn (name = "entry_private_contact_id", updatable = false)
-       @OneToOne (targetEntity = Contact.class, cascade = CascadeType.REFRESH)
+       @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
        private Contact addressbookEntryPrivateContact;
 
        /**
         * Connection to table "addressbooks"
         */
        @JoinColumn (name = "entry_addressbook_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = Addressbook.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = UserAddressbook.class, cascade = CascadeType.REFRESH, optional = false)
        private Addressbook addressbookId;
 
        @Override