neo4j uuid没有创建

时间:2017-04-21 06:12:41

标签: neo4j neo4j.rb graphenedb

class Client
  include Neo4j::ActiveNode
end

> client = Client.new
 => #<Client uuid: nil, bot_client_id: nil, created_at: nil, email: nil, first_name: nil, last_name: nil, sms: nil, telegram_id: nil, updated_at: nil> 

我的期望是uuid会被填充。

1 个答案:

答案 0 :(得分:1)

只有在保存节点对象后才会填充uuid。所以你可以这样做:

client = Client.create

或者:

client = Client.new
client.save