Collection processing should be fixed
Core/System/Odapi/Odapi.php
- callRest should not process collections - it should only make a request and decode data into OBJECT (ODAPI response) or raises an exception in case of error
try {
$l_oOdapiResponse = $this>callRest(...)
} catch (...) {
...
}
-
parseObject and parseArray methods should be removed as callRest always returns an OBJECT (ODAPI response) in case of success.
-
getCollection function returns whole collection (array of objects), so metadata is not in the response
public function getCollection($in_aFilters, $in_aGetFields = null)
- getCollectionPage function returns a collection page (an object with
metadataandresultproperties) ):
getCollectionPage($in_aFilters, $in_nLimit = null, $in_nOffset = null, $in_aGetFields = null)
Return format:
$l_oOdapiResponse = $this->getCollectionPage($_sUrl);
So, getCollection uses getCollectionPage for pages processing.