Mongoose type Decimal128 seems not supported

Feature(s) impacted

Mongodb fields

Observed behavior

If we declare a field as Schema.Types.Decimal128 type in Mongoose. Forest Admin display [object][object] even if we add a custom field with value.toString()

Expected behavior

The field should be automatically displayed as a string.

Context

  • Agent (forest package) name & version:
    @forestadmin/agent”: “^1.35.16”,
    @forestadmin/datasource-mongoose”: “^1.5.29”,
  • Database type: Mongodb

Hello @Julian_Renard,

Indeed, this is something that is currently missing.
I have made an update to the datasource-mongoose package that will fix the issue.
Please hang on while it goes through our release process. I will let you know once available.

Regards,

Nicolas Moreau

Awesome. Is there any workaround meanwhile?

You could write a custom field and parse the json object in the getValues.
But the fix should be live within a couple hours

the fix has been released. please upgrade to : @forestadmin/datasource-mongoose: ^1.5.30

1 Like

It works perfectly thanks!

Btw maybe this list have to be updated accordingly?

2 Likes