SAP / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
121 stars 76 forks source link

Default max page size? #334

Closed NutterzUK closed 4 days ago

NutterzUK commented 1 week ago

Hi,

I’m looking for any guidance please on if there is any mechanism to limit the number of results returned at the service layer from the database.

I can see when I request a resource, the limit is set to 2147483647. This means a badly configured or malicious client could pull millions of records all at once.

Is there a way to set a max number of results (server side)?

wog48 commented 1 week ago

Hello,

There is the option of server driven paging. I documented this option in How To Build Server Driven Paging? The document contains some example as a fruit of thought. Please note that as of today paging is only support on entity set level. See issue#314 . I hope this helps.

NutterzUK commented 1 week ago

Hello,

There is the option of server driven paging. I documented this option in How To Build Server Driven Paging? The document contains some example as a fruit of thought. Please note that as of today paging is only support on entity set level. See issue#314 . I hope this helps.

Thank you @wog48 ! I really appreciate that, sorry I’d not managed to find that document. I’ll have a look through.

If there is anything that we want that isn’t available I’ll find time to contribute back, I was just needing a pointer of where to start.

I really appreciate everything you’ve done in this project - I’ve got a requirement to connect from Salesforce using OData to a Snowflake database and this seems to be providing the perfect layer in between them.

Thanks again for the support, I’ll do what so can to offer something back as soon as I’m up to speed!

wog48 commented 4 days ago

I close the issue. In case there is another issue, feel free to create another one.