import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
*/
@Entity (name = "users")
@Table (
- name = "users",
- indexes = {
- @Index (
- name = "confirmation_key",
- unique = true,
- columnList = "user_confirm_key"
- ),
- @Index (
- name = "user_name",
- unique = true,
- columnList = "user_name"
- )
- }
+ name = "users"
)
@NamedQueries (
{
/**
* Confirmation key
*/
- @Column (name = "user_confirm_key", length = 50)
+ @Column (name = "user_confirm_key", unique = true)
private String userConfirmKey;
/**
* User name
*/
@Basic (optional = false)
- @Column (name = "user_name", nullable = false, length = 20)
+ @Column (name = "user_name", nullable = false, length = 30, unique = true)
private String userName;
/**