activegraph icon indicating copy to clipboard operation
activegraph copied to clipboard

How to globally set model id method

Open am17torres opened this issue 4 years ago • 1 comments

According to the docs:

You can define a global or per-model generation methods if you do not want to use the default.

I'd like to know how to do this.

I am not interested in changing the property name, rather, I'd like to provide a function that generates a shorter id such as https://github.com/peterhellberg/hashids.rb.

Additional information which could be helpful if relevant to your issue:

Code example (inline, gist, or repo)

Runtime information:

Neo4j database version: (3.5.14) neo4j gem version: (9.6.1) neo4j-core gem version: (9.0.0)

am17torres avatar Jan 07 '20 19:01 am17torres

@am17torres as far as I can tell this was not intended as part of the public API but if you look through the code I am sure you can find a way to override that behavior. After all, it's ruby and nearly everything is possible.

klobuczek avatar Jan 07 '20 19:01 klobuczek