General information
Category:
The Mere Mortals .NET Framework
I don't think I understand the delete process in the framework.
I have an entity with 20 records "ReportReturnSum". In this scenerio I have 20 child records in the "ReportReturnHeader" table with a 1-to-1 relationship to the "ReportReturnSum" table.
I would think that as each record in the "ReportReturnSum" entity is deleted my
Protected Overrides Sub HookParentNavigated(ByVal bizObj As mmBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
Me.GetReportReturnSumByFK(CType(e.PrimaryKeyValue, Guid))
End Sub
method would be called for each record in "ReportReturnSum" as it is being deleted.
The only method that gets fired in my "ReportReturnHeader" BO is the
Protected Overrides Sub HookParentRetrieved(ByVal bizObj As mmBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
Me.GetReportReturnSumByFK(CType(e.PrimaryKeyValue, Guid))
End Sub
method when the "ReportReturnSum" entity is filled by
Public Function SelectReportReturnSumByCaseFK(ByVal CasePK As String) As mmBindingList(Of ReportReturnSumEntity)
'Get a dataset of the data we want to delete
Me.GetEntityList("Select * From ReportReturnSum Where rrs_chdGUIDFK = @CasePK", Me.CreateParameter("@CasePK", CasePK))
Return Me.EntityList
End Function
Since the "ReportReturnHeader" HookParentRetrieved method is fired when the entity is filled only one record in "ReportReturnHeader" is being deleted.
Do I have to loop through my "ReportReturnSum" entity and delete each entity 1-by-1 to get the children of that entity to delete too?
Thanks
-Bob S.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only