public interface User extends VertexFrame {
@Property("id")
Long getId();
}
but I only get null.
It seems I need to call user.asVertex().getId().
Seeing that Neo4jElement already has some special handling for the "id"
property in setProperty(), wouldn't it make sense to treat "id" as a
read-only property and return the underlying node id from the invocation
handler?
Cheers,
Harald
"id" is a reserved property in Blueprints. If you want to get the underlying graph id, then use:
user.asVertex().getId()
Would you like me to add getId() as a method to VertexFrame and EdgeFrame?
Marko.
Yes, that would be handy. Saves a level of delegation in the method
call. And when there's no obvious domain-level ID, there's no need to
invent one...
Thanks,
Harald
Hello,
a year later, I have the same Problem like Harald. I want to access the Id from a framed Vertex/Edge.
Was the idea to add a "getId()" Method rejected? I think it would make the work with a FramedGraph and a KeyIndexableGraph easier.
Best regards,
Tom