arangox_ecto
arangox_ecto copied to clipboard
Edge reference to multiple collection types
Discussed in https://github.com/TomGrozev/arangox_ecto/discussions/35
Originally posted by rxndxm January 20, 2022 @TomGrozev Hi! I'm looking to have a References edge, which can point to various Collections (for instance a Video can reference a Person or a Place) -- is this possible? I see only one Collection can be set in the _to: field:
use ArangoXEcto.Edge, from: User, to: Post
Have attempted an approach at doing this but there are constraints in the Ecto ability to have multiple schemas assigned to an association.
Pushing to v1.2 as to not hold up v1.1. Will attempt again later.
Seems like this would be quite important! Is there a suggested way of working around the limitation while the work is in-progress or is the best method just to not use the library until it was added if this was absolutely critical?
Seems like this would be quite important! Is there a suggested way of working around the limitation while the work is in-progress or is the best method just to not use the library until it was added if this was absolutely critical?
Good news @incorvia, I recently found a way to get this working. It will be in the next version. Sorry it took a while haha