Permalink
Browse files

Allow fields to have arrays of associated items.

  • Loading branch information...
1 parent ab53930 commit 285fd8f075467dd9d3715d19d294cc7e312cb60c @tmeasday tmeasday committed Mar 26, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 publish_with_relations.coffee
@@ -20,6 +20,8 @@ Meteor.publishWithRelations = (params) ->
else
objKey = mapping.key
mapFilter._id = obj[mapping.key]
+ if _.isArray(mapFilter._id)
+ mapFilter._id = {$in: mapFilter._id}
_.extend(mapFilter, mapping.filter)
_.extend(mapOptions, mapping.options)
if mapping.mappings

0 comments on commit 285fd8f

Please sign in to comment.