Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArangoDb::Base#save() returns nil after the first save #1

Open
art-solopov opened this issue Feb 19, 2014 · 3 comments
Open

ArangoDb::Base#save() returns nil after the first save #1

art-solopov opened this issue Feb 19, 2014 · 3 comments

Comments

@art-solopov
Copy link

class TestDoc < ArangoDb::Base
  collection :test
end  
# Creating a new object
b = TestDoc.new
b.a = 10
#=> #<TestDoc:0x00000000f90920
# @index=#<ArangoDb::Index:0x00000000f907b8 @indices={:skiplist=>[]}>,
# @target=
#  #<ArangoDb::Document:0x00000000f90830
#   @attributes={},
#   @collection="test",
#   @db_attr_names=[]>,
# @transport=ArangoDb::Transport>
b.a = 10
#=> 10
b.n = 1
#=> 1
b.save
#=> nil
TestDoc.find("test/77990287")
#=> #<TestDoc:0x00000001192070
# @index=#<ArangoDb::Index:0x00000001191f80 @indices={:skiplist=>[]}>,
# @target=
#  #<ArangoDb::Document:0x00000001191ff8
#   @_id="test/77990287",
#   @_rev="77990287",
#   @attributes={"a"=>10, "_key"=>"77990287"},
#   @collection="test",
#   @db_attr_names=[],
#   @location="/_api/document/test/77990287">,
# @transport=ArangoDb::Transport>

As you can see, the document wasn't overwritten properly.
Ruby 2.1.0.

@okiess
Copy link
Owner

okiess commented Feb 19, 2014

Are you running ArangoDB 1.4.x? I haven't updated for the most recent versions yet...

@art-solopov
Copy link
Author

Yes. 1.4.5 to be precise...

@okiess
Copy link
Owner

okiess commented Feb 19, 2014

Must be an issue with Ruby 2.1.0. The test suite works ok with Ruby 1.8.7 against ArangoDB 1.4.8. I'll try to look into the issue at the next chance...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants