def loaded
      fail UnsetRelatedNodeError, 'Node not set, cannot load' if @node.nil?
      @node = if @node.respond_to?(:neo_id)
                @node
              else
                Neo4j::ActiveBase.new_query.match(:n).where(n: {neo_id: @node}).pluck(:n).first
              end
    end
def loaded
      fail UnsetRelatedNodeError, 'Node not set, cannot load' if @node.nil?
      @node = if @node.respond_to?(:neo_id)
                @node
              else
                Neo4j::ActiveBase.new_query.match(:n).where(n: {neo_id: @node}).pluck(:n).first
              end
    end
Loads a node from the database or returns the node if already laoded