These are chat archives for Automattic/mongoose
refproperty doesn't have to be a string, it can be a function that returns a string. If I recall correctly the value of
thisin the ref function is the document, so you should be able to return the collection name from the document. Give me a bit to get to a spot I can pause what I'm working on, and I'll cook up an example.