Я получаю следующую ошибку 'com.microsoft.sqlserver.jdb c .SQLServerException: недопустимое имя столбца' creationOn_MOD '.'. Подобный код работает хорошо в других местах в моем проекте, не знаю, почему эта проблема происходит здесь. Ниже вы найдете файл сущности и сценарий, который я использовал для создания таблицы.
@Entity
@Audited(withModifiedFlag = true)
@Table(name = "SERVICE_ENDPOINT")
public class ServiceEndPoint {
@Id
@GenericGenerator(name = "generator", strategy = "guid")
@GeneratedValue(generator = "generator")
@Column(name = "SERVICE_ENDPOINT_GUID", columnDefinition = "uniqueidentifier")
private String serviceEndPointGuid;
@ManyToOne
@JoinColumn(name = "SERVICE_GUID")
private Services services;
@Column(name = "END_POINT_URL")
private String endPointUrl;
@Column(name = "DELETE_INDICATOR")
private String deleteIndicator;
@CreationTimestamp
@Column(name = "CREATED_ON", columnDefinition = "DATETIME")
@Temporal(TemporalType.TIMESTAMP)
private Date createdOn;
@Column(name = "CREATED_USER")
private String createdUser;
@UpdateTimestamp
@Column(name = "UPDATED_ON", columnDefinition = "DATETIME")
@Temporal(TemporalType.TIMESTAMP)
private Date updatedOn;
@Column(name = "UPDATED_USER")
private String updatedUser;
public ServiceEndPoint() {
}
public String getServiceEndPointGuid() {
return serviceEndPointGuid;
}
public void setServiceEndPointGuid(String serviceEndPointGuid) {
this.serviceEndPointGuid = serviceEndPointGuid;
}
public Services getServices() {
return services;
}
public void setServices(Services services) {
this.services = services;
}
public String getEndPointUrl() {
return endPointUrl;
}
public void setEndPointUrl(String endPointUrl) {
this.endPointUrl = endPointUrl;
}
public String getDeleteIndicator() {
return deleteIndicator;
}
public void setDeleteIndicator(String deleteIndicator) {
this.deleteIndicator = deleteIndicator;
}
public Date getCreatedOn() {
return createdOn;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
public String getCreatedUser() {
return createdUser;
}
public void setCreatedUser(String createdUser) {
this.createdUser = createdUser;
}
public Date getUpdatedOn() {
return updatedOn;
}
public void setUpdatedOn(Date updatedOn) {
this.updatedOn = updatedOn;
}
public String getUpdatedUser() {
return updatedUser;
}
public void setUpdatedUser(String updatedUser) {
this.updatedUser = updatedUser;
}
}
CREATE TABLE SERVICE_ENDPOINT
(
SERVICE_ENDPOINT_GUID UNIQUEIDENTIFIER DEFAULT NEWSEQUENTIALID() NOT NULL,
SERVICE_GUID UNIQUEIDENTIFIER NOT NULL,
END_POINT_URL NVARCHAR(1024),
DELETE_INDICATOR NVARCHAR(1),
CREATED_ON DATETIME,
CREATED_USER UNIQUEIDENTIFIER,
UPDATED_ON DATETIME,
UPDATED_USER UNIQUEIDENTIFIER,
CONSTRAINT PK_SERVICE_ENDPOINT PRIMARY KEY (SERVICE_ENDPOINT_GUID),
CONSTRAINT FK_SERVICE_ENDPOINT_SERVICE FOREIGN KEY (SERVICE_GUID) REFERENCES SERVICES(SERVICE_GUID),
CONSTRAINT FK_SERVICE_ENDPOINT_CREATED_USER FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_GUID),
CONSTRAINT FK_SERVICE_ENDPOINT_UPDATED_USER FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_GUID)
);
CREATE TABLE SERVICE_ENDPOINT_AUD
(
SERVICE_ENDPOINT_GUID UNIQUEIDENTIFIER DEFAULT NEWSEQUENTIALID() NOT NULL,
SERVICE_GUID UNIQUEIDENTIFIER NOT NULL,
SERVICES_MOD BIT NULL,
END_POINT_URL NVARCHAR(1024),
ENDPOINTURL_MOD BIT NULL,
DELETE_INDICATOR NVARCHAR(1),
DELETEINDICATOR_MOD BIT NULL,
CREATED_ON DATETIME,
CREATEDON_MOD BIT NULL,
CREATED_USER UNIQUEIDENTIFIER,
CREATEDUSER_MOD BIT NULL,
UPDATED_ON DATETIME,
UPDATEDON_MOD BIT NULL,
UPDATED_USER UNIQUEIDENTIFIER,
UPDATEDUSER_MOD BIT NULL,
REV INT NOT NULL,
REVTYPE SMALLINT NULL,
PRIMARY KEY CLUSTERED ( [SERVICE_ENDPOINT_GUID] ASC, [REV] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY];
Не уверены, что я здесь сделал неправильно?