perak / meteor-joins

Collection joins for Meteor
77 stars 7 forks source link

Doesn't seem to be reactive to Client-side Insert and Update #13

Closed vnevoa closed 7 years ago

vnevoa commented 7 years ago

Hello perak. Nice job on this package.

I can't seem to be able to trigger a publish when the client does a collection.insert() or update(), and so I end up with documents in the client-side collection that don't have the "join field" filled-in. Possibly other connected clients do get the publication, I haven't tested, but the inserting client doesn't.

If I reload the page, however, the server's publish method is called and I get the joined record too. Is this expected? How can I work around it?

Thanks!

perak commented 7 years ago

@vnevoa this package is using find's transform option to perform join, and transform is not reactive. But there is (very) old pull request that I never merged - someone made it reactive.

I didn't have enough time to play with this, but in some project I need reactive joins too, so most likely I'll see what I can do (cannot promise when as I'm under workload).

vnevoa commented 7 years ago

I see. Thank you for replying. Well, without reactivity the package is basically useless. I'll just have to do it the old-fashioned way with templates and helpers. Godspeed!