Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

UpdateChildren correction

$
0
0

Please, correct me if I'm wrong, but FieldDataManager.UpdateChildren shouldn't be like this:

        public void UpdateChildren(params object[] parameters)

        {

            if (_propertyList == null) return;

            foreach (var pi in _propertyList)

            {

                if ((pi.RelationshipType & RelationshipTypes.Child) > 0)

                {

                    var item = _fieldData[pi.Index];

                    if (item != null)

                    {

                        object obj = item.Value;

                        if (obj is IEditableBusinessObject || obj is IEditableCollection)

                            Csla.DataPortal.UpdateChild(obj, parameters);

                    }

                }

            }

        }

The way it is now, all objects referenced by the businessobject are being treated as children even when they aren't.


Viewing all articles
Browse latest Browse all 764

Trending Articles