The target part from localization key get not the remapped key.
No exception with ServerProfile-Session!

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();
}

asked Sep 15 '14 at 05:33

TeaMan's gravatar image

TeaMan
140131418

edited Sep 15 '14 at 05:36

Thank you for report, TeaMan.

(Sep 15 '14 at 10:11) Alexey Kulakov Alexey%20Kulakov's gravatar image

One Answer:

Thanks a lot, TeaMan, for your report.

We've already fixed this bug.

answered Sep 22 '14 at 05:13

Alexey%20Kulakov's gravatar image

Alexey Kulakov
45215

Good to hear, but when will the fixed version be released?

Thank you.

(Oct 24 '14 at 05:43) TeaMan TeaMan's gravatar image

I think we'll release next version this week.

(Oct 27 '14 at 09:15) Alexey Kulakov Alexey%20Kulakov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA