bug in "cursor.forEach" method
Solved
Hi,
I've tried version 5.0.0 and 5.0.1 of the app and I have some problems executing scripts that runs perfectly in version 4.7.4.
Particularly I have two collections Users and Commune and I have the following simple script:
db.User.find().limit(2).forEach((it)=> {
var commune = db.Commune.findOne();
print(commune);
});
When I run this in 4.7.4 it displays as a result two communes objects which is fine, but when I run this in 5.0.0 or 5.0.1 it keeps loading and loading without a result.
I figured out that this error has to be with having a find inside a forEach because when I run db.Commune.findOne(); indepently it works fine.
Thanks,
Carla
Thank you for your bug report. We will fix it in the next build.
As a workaround solution, please use "toArray()" to get the results first.
Thank you for your bug report. We will fix it in the next build.
As a workaround solution, please use "toArray()" to get the results first.
Fixed in 5.0.3
Fixed in 5.0.3
Replies have been locked on this page!