I am going to try a different approach that I hope to be more constructive.
Here is an implementation of a has_many polymorphic association with Ecto:
Is this approach and the underlying database design recommended (there are some indications that it is not)?
And if not or if there is room for improvement, what would you change?
PS: Thanks again to everyone for the suggestion and lines of thought, it’s really appreciated!
I hope I am not to picky with the answers, maybe it’s one of these cases where there is no way better than the other and it depends on the situation. I’d be skeptical, but maybe.