Mantis - Resin
Viewing Issue Advanced Details
1702 major always 04-23-07 19:12 05-01-07 09:08
westrupp  
westrupp  
high  
closed 3.1.0  
fixed  
none    
none 3.1.1  
0001702: @GeneratedValue with MS SQLServer is not working
Even setting the IDENTITY_INSERT to ON:

SET IDENTITY_INSERT ON;

the following exception is thrown:

javax.persistence.EntityExistsException: Trying to persist an entity of
class 'test.TestBean' with PK
'0' that already exists. Entity state 'TRANSIENT'

A possible workaround would be to use a trigger to set the new id value.

Notes
(0001881)
westrupp   
04-30-07 12:06   
jpa/0g80 (resin db equivalent)
jpa/0g81 (mysql equivalent)