             
             // create the ID of this new relationship without a CONTEXT WRITE
             // TODO: self registering??
-            context.registerRelationship(relationship)
+            context!.registerRelationship(relationship)
             
             endNode.insertInRelationship(relationship)
             

            if (_inRelationships == nil) {
                _inRelationships = [Relationship]()
                
                // read data
                var relationship:Relationship! = nil
                var nextRelationshipID = data.nextInRelationshipID
                
                while (nextRelationshipID > 0) {
                    
                    relationship = context.readRelationship(nextRelationshipID)
                    
                    _inRelationships.append(relationship)
                    

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