I\'m using JPA toplink-essential and SQL Server 2008
My goal is to get auto-increment primary key value of the data that is going t
We are also using SQL Server 2008 and it never worked for me so I always execute separate query "SELECT @@IDENTY"
to get the inserted id.
The reason I found on the net was that auto id (IDENTITY) is managed by database and never fetched in Entity until unless you commit the row or manually retrieve the info from database.