arangodb_ecto icon indicating copy to clipboard operation
arangodb_ecto copied to clipboard

Dynamic has_many

Open jnylen opened this issue 6 years ago • 2 comments

Hi, The main thing I use ArangoDB is a dynamic link between multiple collections.

I.e. you can link a column named "media" to either a movie or a tv show and it will join easily. Is this something you know if Ecto might be able to do? If that is the case I can surely help making arangodb_ecto working with the new db_connection etc.

Currently i'm using a forked Durango but as it has its limtis (i.e. not being able to use IN ARRAY in queries).

jnylen avatar Apr 27 '19 08:04 jnylen

In Ecto this is implemented as a many_to_many relationship in a schema. You can easily have multiple relationships pointing to the same table, but not the other way around, as you are suggesting (afaik).
Of course, if you use raw AQL, you can build anything, but Ecto does not support this scenario. Having help with db_connection would be great. Please join https://gitter.im/Elixir-ArangoDB-Driver-Dev

pinx avatar Apr 28 '19 16:04 pinx