Use Elixir and have two entities -- Voter and Candidate -- with many to many between them(voter can vote for many candidates if it matters). Want to get list of Candidate's sorted by amount of voters. Is there any way to do it using such Elixir's declaration?:
class Voter(Entity):
votes = ManyToMany('Candidate')
class Candidate(Entity):
voters = ManyToOne('Voter')
I've read SQLAlchemy ordering by count on a many to many relationship but want to do it in a clearer way with Elixir. I hope, it's possible.