Child insert but no updateChild insert but no update
Old forum URL: forums.lhotka.net/forums/t/7606.aspx
Vlam100 posted on Friday, September 11, 2009
Hi All,
I am new to the CSLA frame work and I am doing my first project. using vb.net one of my requirements is to do an Import from a excel spreadsheet.
I have a parent object EmployeeImport, and then two child objects EmployeeImportItem which represent one record and then EmployeeImportItems which is the collection of employeeimprtItem.
For new Employees in the spreadsheet I call the newEmployee factory method in the employeeImportItem and it sets the values of all the properties.
For existing participants I call the getEmployee factory Method in the EmployeeImprtItem and do a fetch to get all the values and then overwrite with values from the spreadsheet
I then add them to the collection.
resource.add me.add(resource)
after everything has been added to the collection I call mybase.save to save the the data, but at this stage it will only do the insert for the new employees..child_insert in the child and whatever I do I cant get the Child_update to fire for the existing employees. From tha parent I call
DataPortal.UpdateChild(ReadProperty(Of EmployeeImportItems)(ItemsProperty), Me)Copyright (c) Marimer LLC