Entity example:
@Entity(name = "Flour") @Table(name = "Flour") public static class Flour { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; ... }
and setting
hibernate.jdbc.use_get_generated_keys = false
It will produce the following invalid query with Sql Server:
insert into Flour (description,name,type) values (?,?,?) returning id
instead of ( ORM 5.6.14)
insert into Flour (description, name, type) values (?, ?, ?) select scope_identity()
or
insert into Flour (description, name, type) output inserted.id values (?, ?, ?)