Skip to content

Commit

Permalink
pass properties to unique relationship creation
Browse files Browse the repository at this point in the history
  • Loading branch information
karabijavad committed Nov 29, 2013
1 parent 80c863d commit e851d5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ def create_relationship_auto_index(type = "exact", provider = "lucene")
@relationship_indexes.create_auto(type, provider)
end

def create_unique_relationship(index, key, value, type, from, to)
@relationship_indexes.create_unique(index, key, value, type, from, to)
def create_unique_relationship(index, key, value, type, from, to, props)
@relationship_indexes.create_unique(index, key, value, type, from, to, props)
end

def add_relationship_to_index(index, key, value, id)
Expand Down
5 changes: 3 additions & 2 deletions lib/neography/rest/relationship_indexes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ def initialize(connection)
super(connection, :relationship)
end

def create_unique(index, key, value, type, from, to)
def create_unique(index, key, value, type, from, to, props)
body = {
:key => key,
:value => value,
:type => type,
:start => @connection.configuration + "/node/#{get_id(from)}",
:end => @connection.configuration + "/node/#{get_id(to)}"
:end => @connection.configuration + "/node/#{get_id(to)}",
:properties => props
}
options = { :body => body.to_json, :headers => json_content_type }

Expand Down

0 comments on commit e851d5f

Please sign in to comment.