记录 Neo4j.rb 8.0.x 中的持久性



我正在升级到Neo4j.rb版本8。 按照升级指南中的说明操作后,之前通过的规格现在失败。

具体来说,countpersisted?alllastfind似乎彼此精神错乱。 我可以创建一个帐户,看到它是持久的,如果我计算帐户,则查看它,但如果我查找最后一个帐户或所有帐户,或者尝试从其 id 中找到它,则不会。

下面控制台会话的输出。 我疯了吗?

[1] pry> account = Account.create(company_name: "Acme Corporation, LLC", street_address: "1234 Fake Lane", city: "Pleasantville", state: "CA", zip: "12345", country: "United States", phone: "555-555-5555", contact_name: "Some Guy", contact_phone: "123-456-7890", contact_email: "someguy@acmecorp.com")

=> #<Account uuid: "30c44118-ac45-4559-b63b-8e82fafb16cd", city: "Pleasantville", company_name: "Acme Corporation, LLC", contact_email: "someguy@acmecorp.com", contact_name: "Some Guy", contact_phone: "123-456-7890", country: "United States", created_at: Thu, 23 Mar 2017 19:13:52 +0000, phone: "555-555-5555", remote_id: nil, state: "CA", street_address: "1234 Fake Lane", updated_at: Thu, 23 Mar 2017 19:13:52 +0000, zip: "12345">

[2] pry> account.persisted? => true

[3] pry> Account.count => 1

[4] pry> Account.last => nil

[5] pry> Account.find(account.id) Neo4j::ActiveNode::Labels::RecordNotFound: Couldn't find Account with 'uuid'=30c44118-ac45-4559-b63b-8e82fafb16cd

答案是.......重新启动计算机,一切正常!!111

实际上,问题在于我删除了数据库而不是停止它,然后安装了一个新副本。

相关内容

  • 没有找到相关文章

最新更新