没有创建neo4j uuid [英] neo4j uuid is not created

查看:173
本文介绍了没有创建neo4j uuid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

My expectation is that the uuid would be populated.

推荐答案

仅在保存节点对象后填充uuid.因此,您可以执行以下操作:

The uuid is only populated once the node object has been saved. So you could either do:

client = Client.create

或者:

client = Client.new
client.save

这篇关于没有创建neo4j uuid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆