Hibernate insert failing when embedded key contains identity column on SQL Server
问题 I'm trying to map an entity with hibernate, but with SQL Server, I am not able to proceed. Following are the details. SQL Server Entity CREATE TABLE [dbo].[BOOK_EMBEDDED]( [row_id] [bigint] IDENTITY(1,1) NOT NULL, [group_no] [int] NOT NULL, [book_name] [varchar](255) NULL, CONSTRAINT [PK_BOOK_EMBEDDED] PRIMARY KEY CLUSTERED ( [group_no] ASC, [row_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON