The target part from localization key get not the remapped key. Exception:SQL error occured. SQL error details 'Type: ReferentialConstraintViolation;' Query 'INSERT INTO [CountryLocalization] ([CultureName], [Target.Id], [PostalText], [OfficialText], [AdditionalText], [Text]) VALUES (@p0_0, @p0_1, @p0_2, @p0_3, @p0_4, @p0_5); [p0_0='en-US';p0_1='-1';p0_2='';p0_3='';p0_4='';p0_5='TestCountry']' Original message 'A foreign key value cannot be inserted because a corresponding primary key value does not exist. [ Foreign key constraint name = FK_CountryLocalization_Target_Country ]' Example:using( var session = domain.OpenSession( new SessionConfiguration( SessionOptions.ClientProfile ) ) ) { new Country( session ) { Text = "TestCountry", Code2 = "TE", Code3 = "TES", CodeInt = 1000 }; // Exception using(session.Activate()) session.SaveChanges(); } |
Thank you for report, TeaMan.