ArangoDB.Ecto v0.1.0 ArangoDB.Ecto.Schema View Source

This is a little helper module to releave you of always having to specify the primary key.

In ArangoDB, every document is equipped with a _key field that is usually initialized by the server. This _key field is the one and only primary key - you cannot define your own.

By using this module instead of Ecto.Schema, ArangoDB’s _key is translated into the Ecto default primary key name of id.

If you want to use the ArangoDB _key, specify the option arango_key: true: use ArangoDB.Ecto.Schema, arango_key: true

@primary_key attribute defined:

@primary_key {:id, :binary_id, autogenerate: true, source: :_key}