identity « Stored Procedure « JPA Q&A





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

I have an entity class with

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

2. Hibernate stored Procedures in MSSQL Identity     forum.hibernate.org

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 ...