The title says it all. I have a m:n relationship table UserRoles with the identity Id and the two foreign keys UserUserId and RoleRoleId. Then when I try to persist such a UserRolesEntity instance, I get the error
Cannot insert explicit value for identity column in table 'UserRoles' when IDENTITY_INSERT is set to OFF.
because the adapter tries to insert a zero there as Id instead of not filling the value:
INSERT INTO [eTrash].[dbo].[UserRoles] ([Id], [UserUserId], [RoleRoleId]) VALUES (0,4,3)
With all other entities, inserts work without problems. What could I possibly be doing wrong?