Hey,
It would be nice if you can let us know java action as well, but I am assuming you might be using xpath (refer below image as an example) inside java action so basically, you have 2 options -
1. (Handle this inside MF)Create a new list of Student_result list, iterate over college options, retrieve all the students associated to iterator object using xpath-db and then add that student list to result list and then return list list. This will be slower but not that much.
2. For larger records, option 1 might run slow depending on how many filters have been provided, but if you want more faster retrivial, then you need to modify underline part of option 1. So instead of using xpath-db you can directly Execute OQL query (you need to write OQL for it and need to download OQL module), but remember the OQL query will always return newly created objects in its result so again you need to iterate over result objects and then retrieve actual students list and then return that
But after seeing your domain model setup, I am pretty much sure option 1 will work much better.
Cheers,
Naman Khard
var xpq=com.mendix.core.Core.createXPathQuery(
"\
//System.FileDocument[\
contains(Name,'$nam')\
and\
contains(Name,'$ext')\
and\
Size>$siz\
]\
"
);
xpq.setVariable("nam","a")
xpq.setVariable("ext","xls")
xpq.setVariable("siz",100)
xpq.setAmount(8)
xpq.setOffset(0)
xpq.setDepth(1)
xpq.setDisableSecurity(true)
xpq.addSort("Size",true);
var arr_obj=xpq.execute(context);
...
var xpathFormat="//System.FileDocument[\
contains(Name,'%s')\
and\
contains(Name,'%s')\
and\
Size>%s\
]";
var amount=1;
var offset=0;
var sort={};
var depth=1;
var arr_obj=com.mendix.core.Core.retrieveXPathQueryEscaped(
context,
xpathFormat,
amount,
offset,
sort,
depth,
"xlsx",
"a",
"100"
);