I’m using JPA 2.2 and Hibernate 5.
Now I have an entity with a column like follows:
@Column(name = "a_name", columnDefinition = "TEXT")
private String text;
In my SqlServer DB I added the column this way:
ALTER TABLE [dbo].[mydb] ADD a_name text;
Now I retrieve a String, in JSON format, with Jackson ObjectMapper from a DTO.
When I try to persist the db I always obtain:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'a_name'.
and this happens with any name I call the column..
I’m going mad.. please help!