I have a Test dataset which holds the fields “faculty”, “department” and “subject”.
I want to save the wixDataQuery to be able to call the next() function.
When I query the “Test” collection from the backend I get a different object with no “next()” function. However, doing the same thing from the frontend result an object with a next() function.
Is it possible to this from the backend? Why does it behave like this anyway?
Thanks.
let queryFrontend = await wixData.query("Test").eq("faculty", faculty).eq("department", department).eq("subject", course).limit(30).find();
console.log(queryFrontend);
let queryBackend = await getTestsArrayForCourseDepartmentAndFaculty(faculty,department,course);
console.log(queryBackend);
/**
* import {getTestsArrayForCourseDepartmentAndFaculty} from 'backened/getters'
*
* IN BACKEND/GETTERS :
*
export function getTestsArrayForCourseDepartmentAndFaculty(faculty,department,course) {
return wixData.query("Test").eq("faculty", faculty).eq("department", department).eq("subject", course).limit(30).find();
}
*/