Missing flattened fields in the UI

Given the following setup:

**CollectionA** (collection reference is computedField3)
- field1 (string)
- flattened@@@field2 (string)
- computedField3 (`${field1} ${flattened@@@field2}`)

**CollectionB** (collection reference is computedField4)
- relationToCollectionA (oneToMany native MongoDB reference)

Expected Behaviour

(1) When I go to the list page of collection A, I see computedField3 containing both expected values.
(2) When I go to the list page of collection B, I see relationToCollectionA containing both expected values.

Actual behaviour

Case (1) works. In the case of (2), the value for flattened@@@field2 is missing.

Failure Logs

No logs

Context

  • Project name: jurata
  • Team name: jurata
  • Environment name: all
  • Agent (forest package) name & version: 1.35.16
  • Database type: mongodb
  • Recent changes made on your end if any: None specifically

Hello @David_Roegiers,

Thanks for reporting back on your issue.
To give me some more context, could you please share some more details of your code ?
What do your impacted models look like ? How you defined the relationships, and how you used the flattener ? The best would be to have a minimal reproducible example.

You can send me the snippets in private message if you’d rather avoid posting them on this forum

Thanks :pray:

Regards,
@Nicolas.M

Hello @Nicolas.M

Thanks for getting back to me.

The answer to your questions is already pretty much defined in my original post.

What do your impacted models look like ?

How you defined the relationships, and how you used the flattener ?

The flattener is one level-deep, configured by the asFields attribute in flattenOptions, not using the plugin.

The best would be to have a minimal reproducible example.

It takes a bit of time to do this. I don’t know, when I will find time to set this up. In the meantime, feel free to try it yourself.

Hello @David_Roegiers,

I believe I have reproduced the issue that you are refering to and I am working on a fix.

I will keep this thread updated with its resolution.

1 Like

Hello,

I have just released @forestadmin/datasource-mongoose v1.6.6 in order to fix this issue. Can you please upgrade your agent and let me know if this solves your issue ?
Thanks