oRows collection with the contents of the active cursor. The active cursor should reflect the business object you are loading into.
.T. or .F.
Optional - If the class is set, the collection is filled with business objects with their .oData member set to the cursor data. Use this if you want true child business objects
If empty the cursor data is directly loaded into the
.oRows collection using
SCATTER NAME MEMO. Use this if you just want child data in a collection.
lcCursor Optional - name of the cursor to load. Cursor is loaded from alias and then reset.
You can use either approach to create one to many child objects. Using no class can be more efficient but might require additional code to handle save and other update operations. The recommended procedure in that case is to create a full business object and set its oData member to the data from the data array.
When using actual objects you take the performance on all objects whether you need them or not while in the SCATTER NAME mode you only load an actual child object when its accessed.
*** Using only SCATTER NAME use wws_LineItems oItems = CREATEOBJECT("wwItemList") oItems.LoadFromCursor() ? oItems.oRows.Sku ? oItems.oRows.Description *** Using a wwBusiness class oItems = CREATEOBJECT("wwItemList") oItems.Loadfromcursor("cLineItems") ? oItems.oRows.oData.Sku ? oItems.oRows.oData.Description oItems.oRows.oData.Discount = .20 ? oItems.oRows.CalculateItemTotal()
See also:Class wwBusinessChildCollection
Comment or report problem with topic