I'm now using EF 4.0,and I create a sample table named TableB,Table B‘s PK is (Id,YearMonth,Time),and column ClientId has been set as auto increased identity when I Add a new record , Exception occrued And the full callstack is
System.Data.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source)
System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
System.Data.Objects.ObjectContext.SaveChanges()
However,if I set the CientId column not as a identity column,every thing works fine Can anyone tell me why this problem happens? thanks in advance