This is entity framework 4.
CurrentProperty.FMVHistories.Add(FMVPresenter.GetFMVHistoryObject());
DataLayer.AccrualTrackingEntities repository = new AccrualTrackingEntities();
repository.Properties.AddObject(CurrentProperty);
repository.SaveChanges();
Right before I call SaveChanges, CurrentProperty has 1 object in its FMVHistories collection, as it should. Right after the save, it has two - the second of which appears to be a copy of the first, both of which have their foreign keys set, properly.
All objects involved here are new. None were loaded in any way.
FMVHistory has a composite key of 3 fields, one of which is the foreign key to the property it's attached to.
Does anyone know why this second FMVHistory object is getting added?