Closed zayau closed 8 years ago
Hey @zayaisshawn just as the error states, there's already a transform function defined for that collection. Perhaps collectionfs has already created one? I don't have any experience using that package, maybe it has its own way for you to add methods to the transform function it has setup. Have you opened an issue over there?
Hi @dburles I have not opened an issue there. Yes, it turns out FS.Collection has its own transform function created. In my understanding, It is different from normal transform function you use on any mongo.collection. I have not found the answer to this problem yet. However, since I use reywood:publish-composite, it's easier to just publish related cursor and use template helper. Someone on stackoverflow suggested to define custom function on fs.collection prototype. I lack experience to do that but I will look further into that later. Thank you.
Hey thanks @zayaisshawn if you do find how to work around the incompatibility I'd appreciate it if you would let me know
collectionFS could add support for this package
True. If there is no pull request already, I'll add one.
Say Photos is a FS.Collection. And when you do Photos.files.helpers({...}); you get Error: [Can't apply helpers to 'cfs.photos.filerecord' a transform function already exists!] error message. CollectionFS doc says underlying Mongo.Collection instance available through myFSCollection.files.