Hi,
I have a protected property and a protected navigation property.
The idea of making them protected is to disallow any direct modifications from other assemblies, like from the UI.
This has always been working in 5.1.0, I am able to set them from within the DomainModel partial class.
After porting to 5.2.2, I have exceptions because even my DomainModel partial class cannot set its protected member data.
The DomainModel....Designer.cs shows the following property:
#region SomeProtectedName
/// <summary>Gets or sets the SomeProtectedName.</summary>
[Bindable(true, BindingDirection.TwoWay)]
[Editable(true)]
[Display(Name="SomeProtectedName", AutoGenerateField=true)]
[IbVal.ValidateProperty]
[IbCore.DBDataType(typeof(String))]
[MsSer.DataMember]
public String SomeProtectedName {
get { return SomeProtectedNameEntityProperty.GetValue(this); }
[global::System.Diagnostics.DebuggerNonUserCode]
protected set { SomeProtectedNameEntityProperty.SetValue(this, value); }
}
#endregion SomeProtectedName
Exception "Cannot set property: Password. It is a readonly property" will be thrown if you attempt to assign it in DomainModel partial class.
The DomainModel....Designer.cs shows the following Navigation property:
#region HeadPerson
/// <summary>Gets or sets the HeadPerson.</summary>
[Bindable(false)]
[Display(AutoGenerateField=false)]
[MsSer.DataMember]
[IbEm.RelationProperty("FK_Organisation_HeadPerson", IbEm.QueryDirection.ToRole1)]
public Person HeadPerson {
get { return HeadPersonEntityProperty.GetValue(this); }
[global::System.Diagnostics.DebuggerNonUserCode]
protected set { HeadPersonEntityProperty.SetValue(this, value); }
}
#endregion HeadPerson
A null reference exception will be thrown if you attempt to assign it in DomainModel partial class.
Is this expected in 5.2.2 ?
Regards
Sebastian