Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Accessing the underlying Mongoose object

default discord avatar
devperson2 years ago
2

There doesn't seem to be a way to do this -- will this ever be possible?



Would be useful to get the database connection to do more complex aggregations for instance

  • discord user avatar
    jmikrut
    2 years ago

    You can do it!



    payload.collections[collectionSlug].Model
  • default discord avatar
    devperson2 years ago

    oh nice, thanks!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team..