feliixx/mgodatagen

[Question] How to reference a generate field value from the same collection

Closed this issue · 1 comments

I have defined a "startDate" field to be generated but I need to create a "createdAt" field with the same value of startDate (or the day before). Is it possible?

Hi @julianonunes,

it's possible with reference generators like this: https://mongoplayground.net/p/2fAhLyIWl4B

I've released a new version with this feature: version 0.9.2