lib/active_graph/node/persistence.rb in activegraph-10.0.0.pre.beta.5 vs lib/active_graph/node/persistence.rb in activegraph-10.0.0.pre.beta.6
- old
+ new
@@ -65,11 +65,11 @@
# @param [Hash] node_props The type-converted properties to be added to the new node.
# @param [Array] labels The labels to use for creating the new node.
# @return [ActiveGraph::Node] A CypherNode or EmbeddedNode
def _create_node(node_props, labels = labels_for_create)
query = "CREATE (n:`#{Array(labels).join('`:`')}`) SET n = $props RETURN n"
- neo4j_query(query, {props: node_props}, wrap_level: :core_entity).to_a[0].n
+ neo4j_query(query, {props: node_props}, wrap: false).to_a[0][:n]
end
# As the name suggests, this inserts the primary key (id property) into the properties hash.
# The method called here, `default_property_values`, is a holdover from an earlier version of the gem. It does NOT
# contain the default values of properties, it contains the Default Property, which we now refer to as the ID Property.
@@ -155,10 +155,10 @@
end
def load_entity(id)
query = query_base_for(id, :n).return(:n)
result = neo4j_query(query).first
- result && result.n
+ result && result[:n]
end
def query_base_for(neo_id, var = :n)
ActiveGraph::Base.new_query.match(var).where(var => {neo_id: neo_id})
end