[ https://issues.apache.org/jira/browse/OLINGO-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pasan Tennakoon updated OLINGO-1569: ------------------------------------ Description: Olingo Entity Streaming support allows us to process entities chunk by chunk. Only after all the chunks are processed we get to know the entire results and {*}its count{*}. However *entityCollectionIntoStream* method in *ODataXmlSerializer* and *ODataJsonSerializer* calls *writeCount* method before calling *writeEntitySet* method. *writeEntitySet* method is the method which calls the iterator *(EntityIterator)* where we process the entities one by one. Calling *writeCount* method before calling the *writeEntitySet* method means we need to know the count of the result before we process and get to know the final result. !image-2022-05-17-15-10-10-102.png|width=466,height=139! was: Olingo Entity Streaming support allows us to process entities chunk by chunk. Only after all the chunks are processed we get to know the entire results and {*}its count{*}. However entityCollectionIntoStream method in ODataXmlSerializer and ODataJsonSerializer calls writeCount method before calling writeEntitySet method. writeEntitySet method is the method which calls the iterator (EntityIterator) where we process the entities one by one. Calling writeCount method before calling the writeEntitySet method means we need to know the count of the result before we process and get to know the final result. !image-2022-05-17-15-10-10-102.png|width=466,height=139! > Count get append to the response before processing the entities using > EntityIterator in Olingo Entity Streaming support. > ------------------------------------------------------------------------------------------------------------------------ > > Key: OLINGO-1569 > URL: https://issues.apache.org/jira/browse/OLINGO-1569 > Project: Olingo > Issue Type: Bug > Components: odata4-commons, odata4-server > Reporter: Pasan Tennakoon > Priority: Major > Attachments: image-2022-05-17-15-10-10-102.png > > > Olingo Entity Streaming support allows us to process entities chunk by chunk. > Only after all the chunks are processed we get to know the entire results and > {*}its count{*}. > However *entityCollectionIntoStream* method in *ODataXmlSerializer* and > *ODataJsonSerializer* calls *writeCount* method before calling > *writeEntitySet* method. *writeEntitySet* method is the method which calls > the iterator *(EntityIterator)* where we process the entities one by one. > Calling *writeCount* method before calling the *writeEntitySet* method means > we need to know the count of the result before we process and get to know the > final result. > > !image-2022-05-17-15-10-10-102.png|width=466,height=139! > -- This message was sent by Atlassian Jira (v8.20.7#820007)