GetParent() public method

public GetParent ( ) : object
return object
        private void PersistObjectGraphWithRelationship(ParentChildGlue parentRelation)
        {
            object entityParent = parentRelation.GetParent();
            object entity = parentRelation.GetChild();
            Node parent = null;

            Node child = _nodeMapper.SaveAndReturnAsNode(entity);
            if (entityParent != null)
            {
                parent = _nodeMapper.SaveAndReturnAsNode(entityParent);
                parent.CreateRelationshipTo(child, parentRelation.GetMemeberName());
            }

            this.QueueDirectChild(entity);

            if (_toWalk.Count == 0) return;
            PersistObjectGraphWithRelationship(_toWalk.Pop());
        }
Beispiel #2
0
        private void PersistObjectGraphWithRelationship(ParentChildGlue parentRelation)
        {
            object entityParent = parentRelation.GetParent();
            object entity       = parentRelation.GetChild();
            Node   parent       = null;

            Node child = _nodeMapper.SaveAndReturnAsNode(entity);

            if (entityParent != null)
            {
                parent = _nodeMapper.SaveAndReturnAsNode(entityParent);
                parent.CreateRelationshipTo(child, parentRelation.GetMemeberName());
            }

            this.QueueDirectChild(entity);

            if (_toWalk.Count == 0)
            {
                return;
            }
            PersistObjectGraphWithRelationship(_toWalk.Pop());
        }