Permalink
Browse files

Merge pull request #3 from tmeasday/allow-arrays

Allow fields to have arrays of associated items.
  • Loading branch information...
2 parents 73439fd + 285fd8f commit 36373575e01268dbbb60a7f9eef267a54912b686 @svasva committed Mar 26, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 publish_with_relations.coffee
View
2 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 3637357

Please sign in to comment.