Hi
I'm trying to use Unit Of Work (ReadOnlyBase) to retrieve in one trip an EditableRootObject and a bunch of NVL, ReadOnlyLists, etc.
Each one of those objects are declared as properties with a private setter... like this:
Private Shared ReadOnly _AfiliacionProperty As PropertyInfo(Of Afiliacion) = RegisterProperty(Of Afiliacion)(Function(p As AfiliacionUnitOfWork) p.AfiliacionMember, Csla.RelationshipTypes.Child)
Public Property AfiliacionMember() As Afiliacion Implements IUnitOfWork(Of Afiliacion, AfiliacionSecurityObject).Model
Get
Return GetProperty(_AfiliacionProperty)
End Get
Private Set(ByVal value As Afiliacion)
LoadProperty(_AfiliacionProperty, value)
End Set
End Property
Private Shared _NacionalidadesProperty As PropertyInfo(Of NacionalidadNameValueList) = RegisterProperty(Of NacionalidadNameValueList)(Function(p As AfiliacionUnitOfWork) p.NacionalidadesMember, Csla.RelationshipTypes.Child)
Public Property NacionalidadesMember As NacionalidadNameValueList
Get
Return GetProperty(_NacionalidadesProperty)
End Get
Private Set(ByVal value As NacionalidadNameValueList)
LoadProperty(_NacionalidadesProperty, value)
End Set
End Property
The exception should also tell you why it can't be saved. One of
Hard to help you without knowing which of these is the issue.
Hi Rocky!,
I guess you missed the "factor number five"!... Badly designed UI custom controls that never raise OnPropertyChanged Events for the Value property...
I'm really sorry for wasting your time like this... It's 1:48am here and I just find this bug.
For anyone interested in this situation, the answer is
5.- The user( or in my case, the user interface control) is not reporting changes to Datasource before calling BeginSave so
nothing has changed and CSLA avoids the trip to the server to save an unchanged object.
This answer why IsSavable was False all the time.
Thank you very much for your time.
Copyright (c) Marimer LLC