Re: Help I don't know why my Timestamp statement in JAVA for certain fields is only giving me null on the Server
import javax.persistence.*;
import java.util.Date;
@Entity
@Table (name ="clients")
public class Client {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "clientId", nullable = false, unique = true)
private Long clientId;
@Column(name = "typeId", nullable = false, length = 150)
private String typeId;
@Column(name = "numberId", nullable = false, length = 150)
private Long numberId;
@Column(name = "statustClient", nullable = false, length = 150)
private String statusClient;
@Column(name = "clientType", nullable = false, length = 150)
private String clientType;
@Column(name = "address", nullable = false, length = 150)
private String address;
@Column(name = "phone", nullable = false, length = 150)
private String phone;
@Column(name = "email", nullable = false, length = 150)
private String email;
@Column(name = "firstName", nullable = false, length = 150)
private String firstName;
@Column(name = "secondName", nullable = false, length = 150)
private String secondName;
@Column(name = "firstLastName", nullable = false, length = 150)
private String firstLastName;
@Column(name = "secondLastName", nullable = false, length = 150)
private String secondLastName;
@Column(name = "bornDate", nullable = false, length = 150)
private Date bornDate;
@Column(name = "creationDate", nullable = true, length = 150, columnDefinition = " TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
private Date creationDate;
@Column(name = "creationUser", nullable = false)
private String creationUser;
@Column(name = "modDate", nullable = true, length = 150, columnDefinition = " TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
private Date modDate;
@Column(name = "modUser", nullable = false, length = 150)
private String modUser;
public Long getClientId() {
return clientId;
}
public void setClientId(Long clientId) {
this.clientId = clientId;
}
public String getTypeId() {
return typeId;
}
public void setTypeId(String typeId) {
this.typeId = typeId;
}
public Long getNumberId() {
return numberId;
}
public void setNumberId(Long numberId) {
this.numberId = numberId;
}
public String getStatusClient() {
return statusClient;
}
public void setStatusClient(String statusClient) {
this.statusClient = statusClient;
}
public String getClientType() {
return clientType;
}
public void setClientType(String clientType) {
this.clientType = clientType;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getSecondName() {
return secondName;
}
public void setSecondName(String secondName) {
this.secondName = secondName;
}
public String getFirstLastName() {
return firstLastName;
}
public void setFirstLastName(String firstLastName) {
this.firstLastName = firstLastName;
}
public String getSecondLastName() {
return secondLastName;
}
public void setSecondLastName(String secondLastName) {
this.secondLastName = secondLastName;
}
public Date getBornDate() {
return bornDate;
}
public void setBornDate(Date bornDate) {
this.bornDate = bornDate;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public String getCreationUser() {
return creationUser;
}
public void setCreationUser(String creationUser) {
this.creationUser = creationUser;
}
public Date getModDate() {
return modDate;
}
public void setModDate(Date modDate) {
this.modDate = modDate;
}
public String getModUser() {
return modUser;
}
public void setModUser(String modUser) {
this.modUser = modUser;
}
}
this is the code I'm using in Java in order to make the uploads to the table from the backend and I can't really move into front until I solve at least this bug