]> git.mxchange.org Git - jcontacts-core.git/blobdiff - src/org/mxchange/jcontacts/contact/UserContact.java
created unique index on email address
[jcontacts-core.git] / src / org / mxchange / jcontacts / contact / UserContact.java
index b98dfd33465374f277557a64fa4b0b2c90bffdc5..0797db4becd82d0d04a32885e30ec1b88412c95d 100644 (file)
@@ -60,6 +60,11 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
                        @Index (
                                        name = "contact_gender",
                                        columnList = "contact_gender"
+                       ),
+                       @Index (
+                                       name = "contact_email_address",
+                                       unique = true,
+                                       columnList = "contact_email_address"
                        )
                }
 )
@@ -109,7 +114,7 @@ public class UserContact implements Contact, Comparable<Contact> {
         * Country code
         */
        @JoinColumn (name = "contact_country_id", nullable = false)
-       @OneToOne(targetEntity = CountryData.class, optional = false, fetch = FetchType.EAGER)
+       @OneToOne (targetEntity = CountryData.class, optional = false, fetch = FetchType.EAGER)
        private Country contactCountry;
 
        /**
@@ -137,7 +142,7 @@ public class UserContact implements Contact, Comparable<Contact> {
         * Fax number
         */
        @JoinColumn (name = "contact_fax_number_id")
-       @OneToOne(targetEntity = FaxNumber.class,cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
        private DialableFaxNumber contactFaxNumber;
 
        /**