meteor-collection-hooks icon indicating copy to clipboard operation
meteor-collection-hooks copied to clipboard

attach hooks to raw collections

Open micktaiwan opened this issue 3 years ago • 3 comments

What would be a simple way to attach hooks to raw collections (except by redefining collection.find, etc...) I really would like to use this package on mongodb raw collections.

micktaiwan avatar Dec 07 '21 19:12 micktaiwan

Hello! Sorry for digging up such an old topic. I was wondering if you found a solution to the above issue? Sometimes, I want to perform bulkInsert/write/... operations on collection A and would like to retrieve everything I've inserted/modified to update counters in collection B (which depends on A)."

What are your thoughts on this?

Best regards, Mathias

mathiasbie avatar Jan 07 '24 11:01 mathiasbie

No, I just overrided find, findOne, etc by hand. So I did what I wanted to avoid (redefining collection.find)

micktaiwan avatar Jan 07 '24 13:01 micktaiwan

OK thanks for the quick answer !

mathiasbie avatar Jan 08 '24 07:01 mathiasbie