(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
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
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
Thanks for submitting this improvement, and apologies for not getting back to you earlier. There have been some pressing things on our plate in the meantime.
So, your release fixed the multiple flattening problems we had on ForestAdmin. Hooray!
Just before releasing it, I saved a bad issue for our operators, since the search does not work any more. Very much not, hooray!
I tried different approaches and can confirm, the search is simply bogus on all methods and collections. No matter what I give in, it simply returns all paginated records without applying filtering.
Not sure, whether this regression is part of this or another improvement.
Can you look into it? I assume it is already fixed or am I the only one, who wants to jump on this datasource-mongoose version?
During the work on the fix for the flattening issue we did stumble accross some issues with the search (which were already there before 1.6.6), and have have been fixed in the follow-up release @forestadmin/datasource-mongoose@1.6.7.
I have tested a couple use cases in this version, including flattened fields, global search bar, filtering on specific columns with various types and so on, but did not find anything unexpected on the search behavior.
Can you try upgrading to 1.6.7 or above and test again ?
If still encounter issues, could you please open up a new post with a specific search issue that you have so that we can reproduce ?
When I switch “@forestadmin/datasource-mongoose” from “1.5.30” to “1.5.31” all the search features stop working. They return simply all values, no matter what the filter is.
What should I do?
Copying this in a separate issue, as you requested.