That is correct.
As I've discussed in other threads, the object factory model leaves all the work to the factory implementation intentionally so as to not reduce flexibility as people create their own data access layers using the model.
In other words, I presuppose that users of the object factory model will create a DAL based around the object factory model, not necessarily use it from scratch (as that requires a fair amount of work).
The DataPortal_XYZ model is intended for use when you want CSLA to do more work on your behalf.
So, in this scenario, how would we go about actually saving child objects? Would you suggest just calling the '.Update()' method on the DAL of a particular child object? Is there a way to iterate through all child properties and then simply call .Save() on them, or something similar?
It totally depends on how you are choosing to implement your factory objects and DAL. There are so many different ways to do this...
For my part, if I'm using ObjectFactory, I tend to make my factory objects be the DAL, so they are what actually talk to the database. This is because ObjectFactory is already a level of indirection, and you can have many different sets of factory objects, one for each type of database or whatever.
But even if you make that assumption, you still have to pick a data access technology like raw ADO.NET, EF, L2S, NHibernate, etc. And that affects how you write your DAL code as well. I tend to use either raw ADO.NET or EF, with a preference for raw ADO.NET (connection/command/datareader/etc) since I think EF tends to complicate more than it simplifies.
Given those assumptions, I typically have a private method that is called by the public Update method - one private method for each child object type.
Basically I look at a factory object as being responsible for persisting an entire object graph defined by the root object's type.
But I'm sure other people have different views and different approaches. And certainly the approach could be very different if you are using EF or NHibernate or other technologies, because you could (and should) create your own factory object base type (subclass ObjectFactory) to help streamline and simplify your code.
Copyright (c) Marimer LLC