     
     // Delete a existing relationship between this node (start node) and the specified node (end node)
     public func deleteOutRelationshipNode(endNode: Node) {
+        
+        assert(context != nil, "No GraphContext available")
         
         var relationship = self.outRelationshipTo(endNode)
         

    // TODO: this version is migrated from SONode
    // improve the implementation e.g. reuse the informarion form outRelationships
    public func outRelationshipTo(endNode: Node) -> Relationship? {
        // read data
        var relationship:Relationship! = nil;
        var nextRelationshipID = outRelationshipID
        
        while (nextRelationshipID > 0) {
            
            relationship = context.readRelationship(nextRelationshipID)
            
            if (relationship.endNodeID == endNode.uid) {
                return relationship;

    // TODO: define a protocol?
    
    override func update() {
        if context != nil {
            context!.updateNode(self)
        }
    }
    
    // MARK: Property
