package com.royalrangers.model;

import com.royalrangers.enums.UserRank;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.Set;

@Getter
@Setter
@Entity
public class User {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "user_seq")
    @SequenceGenerator(name = "user_seq", sequenceName = "user_seq", allocationSize = 1)
    private Long id;

    private String email;
    private String password;
    private String firstName;
    private String lastName;
    private String gender;
    private String telephoneNumber;
    private Long birthDate;
    private Boolean enabled;
    private Boolean confirmed;
    private Boolean approved;
    private UserRank userRank;

    @Temporal(TemporalType.TIMESTAMP)
    private Date lastPasswordResetDate;

    @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @JoinColumn(name = "country_id")
    private Country countryID;
    
    @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @JoinColumn(name = "city_id")
    private City cityID;

    @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @JoinColumn(name = "group_id")
    private Group groupID;

    @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @JoinColumn(name = "platoon_id")
    private Platoon platoonID;

    @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @JoinColumn(name = "section_id")
    private Section sectionID;

    @ManyToMany(fetch = FetchType.EAGER,cascade = CascadeType.MERGE)
    @JoinTable(
            name = "USER_AUTHORITY",
            joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")},
            inverseJoinColumns = {@JoinColumn(name = "authority_id", referencedColumnName = "id")})
    private Set<Authority> authorities;

}
@@ -1176,20 +1176,18 @@
 ity city
-ID
 ;%0A
+
 %0A    @Ma
@@ -1302,18 +1302,16 @@
 up group
-ID
 ;%0A%0A    @
@@ -1434,18 +1434,16 @@
  platoon
-ID
 ;%0A%0A    @
@@ -1566,18 +1566,16 @@
  section
-ID
 ;%0A%0A    @
@@ -1920,9 +1920,10 @@
 ities;%0A%0A
-
 %7D
+%0A

Update User.java