]> git.mxchange.org Git - jcontacts-core.git/commitdiff
created unique index on email address
authorRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 16:21:11 +0000 (18:21 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 16:21:11 +0000 (18:21 +0200)
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;
 
        /**