From: Roland Haeder Date: Sat, 10 Oct 2015 20:08:33 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7d809ee21da2c245a8b3df85551ea64c3d15fc6;p=juser-activity-core.git Continued: - added unique index for confirmation key - updated jars - updated .gitignore --- diff --git a/.gitignore b/.gitignore index 1cd7a86..0383bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /nbproject/private/ +/nbproject/*~ /manifest.mf /build/ /dist/ +/data/* /*.properties diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 98ca617..855385d 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index 57a3b6c..1a75fc0 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 3900e4e..76ac2d3 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 19ab30a..3c7b78a 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -26,6 +26,7 @@ import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Index; import javax.persistence.JoinColumn; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; @@ -43,7 +44,15 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * @author Roland Haeder */ @Entity (name = "users") -@Table (name = "users") +@Table ( + name = "users", + indexes = + @Index ( + name = "confirmation_key", + unique = true, + columnList = "user_confirm_key" + ) +) @NamedQueries ( { @NamedQuery (name = "AllUserNames", query = "SELECT DISTINCT u.userName FROM users AS u ORDER BY u.userId ASC"), @@ -76,8 +85,8 @@ public class LoginUser implements User { /** * Id number from "contacts" table */ - @JoinColumn (name = "contact_id", nullable = false, updatable = false) - @OneToOne (cascade = CascadeType.ALL, targetEntity = UserContact.class, optional = false) + @JoinColumn (name = "user_contact_id", nullable = false, updatable = false) + @OneToOne (targetEntity = UserContact.class, optional = false, cascade = CascadeType.ALL) private Contact userContact; /**