identity « Stored Procedure « JPA Q&A

1. Hibernate: receive generated ID from a callable custom insert

I have an entity class with

@SQLInsert(callable = true, sql = "{ call sp_InsertEntity(?, ?, ?) }")
public class Entity {
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "entity_id")
  private ...

2. Hibernate stored Procedures in MSSQL Identity

I tried to execute insert stored procedure for table and hibernate mapping file with Identity generator field. {call dbo.insert_Test (@data=?)} Unfortunately hibernate does not handle identity with stored procedures well. My guess it ...