long startNodeId = startNode.getId();
NodeImpl firstNode = getLightNode( startNodeId );
if ( firstNode == null )
{
setRollbackOnly();
throw new NotFoundException( "First node[" + startNode.getId()
+ "] deleted" );
}
long endNodeId = endNode.getId();
NodeImpl secondNode = getLightNode( endNodeId );
if ( secondNode == null )
{
setRollbackOnly();
throw new NotFoundException( "Second node[" + endNode.getId()
+ "] deleted" );
}
long id = idGenerator.nextId( Relationship.class );
RelationshipImpl rel = new RelationshipImpl( id, startNodeId, endNodeId, type, true );
boolean firstNodeTaken = false;