szokodiakos / typegoose

Typegoose - Define Mongoose models using TypeScript classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Options not passed through to mongoose & plugins when using ref

hasezoey opened this issue · comments

Versions

  • Typegoose(GIT): 5d82c5a (6.0.0-17)

Code Example

class T {
  @prop({ ref: something, customoption: 'hello' }) // customoption dosnt get passed through
  public t: Ref<something>
}

Do you know why it happenes?

yes, because for ref, itemsref, refpath, itemsrefpath are type & ref set, but options are not passed throught

Fixed in 6.0.0-18 (97f0ba3)

can be used in @hasezoey/typegoose@next