Save causes a stack overflow exception for the sample provided script. SVN 549.
Shopper mark = new Shopper();
mark.DateOfBirth = new DateTime(1977, 8, 27);
mark.GenderCode = "M";
mark.UsesTobacco = false;
mark.IsStudent = false;
mark.LastModifiedDate = DateTime.Now;
mark.AssociatedCampaignId = 1;
Shopper janet = new Shopper();
janet.DateOfBirth = new DateTime(1980, 10, 28);
janet.GenderCode = "F";
janet.UsesTobacco = false;
janet.IsStudent = false;
janet.LastModifiedDate = DateTime.Now;
janet.AssociatedCampaignId = 1;
Relationship spouse = new Relationship();
spouse.RelationshipTypeId = (int)RelationshipTypeList.Spouse;
spouse.RelatedShopperIdSource = janet;
spouse.RelatedToShopperIdSource = mark;
mark.RelationshipCollectionGetByRelatedToShopperId.Add(spouse);//comment these two lines to work around stack overflow
janet.RelationshipCollectionGetByRelatedShopperId.Add(spouse);//
DataRepository.ShopperProvider.Save(mark);
DataRepository.ShopperProvider.Save(janet);
spouse.RelatedToShopperId = mark.ShopperId;
spouse.RelatedShopperId = janet.ShopperId;
DataRepository.RelationshipProvider.Save(spouse);
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.Copy() Line 901 + 0x19 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.Clone() Line 928 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.MakeCopyOf(object x = {ExtendHealth.Entities.Shopper}) Line 552 + 0x14 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.Copy() Line 523 + 0x17 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.Clone() Line 538 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ListBase<ExtendHealth.Entities.Relationship>.MakeCopyOf(object x = {ExtendHealth.Entities.Relationship}) Line 580 + 0x14 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.TList<ExtendHealth.Entities.Relationship>.Copy() Line 125 + 0x39 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.TList<ExtendHealth.Entities.Relationship>.Clone() Line 113 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.MakeCopyOf(object x = Count = Cannot evaluate expression because the current thread is in a stack overflow state.) Line 942 + 0x14 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.Copy() Line 914 + 0x21 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.Clone() Line 928 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.MakeCopyOf(object x = {ExtendHealth.Entities.Shopper}) Line 552 + 0x14 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.Copy() Line 523 + 0x17 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.RelationshipBase.Clone() Line 538 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ListBase<ExtendHealth.Entities.Relationship>.MakeCopyOf(object x = {ExtendHealth.Entities.Relationship}) Line 580 + 0x14 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.TList<ExtendHealth.Entities.Relationship>.Copy() Line 125 + 0x39 bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.TList<ExtendHealth.Entities.Relationship>.Clone() Line 113 + 0xa bytes C#
ExtendHealth.Entities.dll!ExtendHealth.Entities.ShopperBase.MakeCopyOf(object x = Count = Cannot evaluate expression because the current thread is in a stack overflow state.) Line 942 + 0x14 bytes C#