Spring Boot: 2.0.2
Hibernate Core: 5.2.17
dialect: SQLServer2012Dialect
When trying to save entity whose id is a generated GUID into SQL Server using JpaRepository save() method the operation fails with the following messages:
SQL Error: 8169, SQLState: S0002
Conversion failed when converting from a character string to uniqueidentifier
HHH000327: Error performing load command : org.hibernate.exception.SQLGrammarException: could not load an entity
com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting from a character string to uniqueidentifier
@Id
@GenericGenerator(name = "generator", strategy = "guid", parameters = {})
@GeneratedValue(generator = "generator" , strategy = GenerationType.AUTO)
@Column(name = "ActivityID" , columnDefinition="uniqueidentifier")
private String ActivityID;
Another description of the problem: Conversion failed from a character string to uniqueidentifier