Collection Helper vs Publish Composite package?

Collection Helper and Publish Composite package the same purpose or not?

To me:

  • Collection Helper is a lightweight package that facilitates the use of a collection transform function (see here). When using this package, any Collection.find() won’t return a plain object anymore, but a JavaScript object on which you can attach methods. Those methods can then be called from your js code or directly from your template html.
  • Publish Composite is a sophisticated package to dynamically combine (join) and publish related database record sets.

I want to use collection join like View of MySQL.
Which should i use?

Both!

You’ll need publish composite to publish parent collections and their related child documents.

You’ll need collection helpers to access your child records from within your parent records easily by calling simple methods instead of a series of find operations.

Both packages have great documentation and simple examples.

1 Like

Could also see cottz:publish-relations, basically does the same job as publish-composite but its structure is very different

1 Like