       @belongsTo 'author', from: 'users'
       @belongsTo 'discussion'
       @hasMany   'pollOptions'
-      @hasMany   'stances'
+      @hasMany   'stances', sortBy: 'createdAt', sortDesc: true
 
     group: ->
       @discussion().group() if @discussion()

    uniqueStancesByUserId: ->
      stancesByUserId = {}
      _.each @stances(), (stance) ->
        stancesByUserId[stance.participantId] = stance
      stancesByUserId

    stanceFor: (user) ->
      @uniqueStancesByUserId()[user.id]

    group: ->
      @discussion().group() if @discussion()

    uniqueStances: (order, limit) ->
      _.slice(_.sortBy(_.values(@uniqueStancesByUserId()), order), 0, limit)

    stanceFor: (user) ->
      @uniqueStancesByUserId()[user.id]

    lastStanceByUser: (user) ->
      @uniqueStancesByUserId()[user.id]

