Esempio n. 1
0
        public override void SetChildAt(IBTreeNode node, int childIndex, int indexDestination,
                                        bool throwExceptionIfDoesNotExist)
        {
            var childOid = (OID)node.GetChildIdAt(childIndex, throwExceptionIfDoesNotExist);

            _childrenOids[indexDestination] = childOid;

            if (childOid != null)
            {
                // The parent of the child has changed
                var child = Btree.GetPersister().LoadNodeById(childOid);
                child.SetParent(this);
                Btree.GetPersister().SaveNode(child);
            }
        }
Esempio n. 2
0
        public override void SetChildAt(IBTreeNode node, int childIndex, int indexDestination,
                                        bool throwExceptionIfDoesNotExist)
        {
            var childOid = (OID) node.GetChildIdAt(childIndex, throwExceptionIfDoesNotExist);
            _childrenOids[indexDestination] = childOid;

            if (childOid != null)
            {
                // The parent of the child has changed
                var child = Btree.GetPersister().LoadNodeById(childOid);
                child.SetParent(this);
                Btree.GetPersister().SaveNode(child);
            }
        }