One vs FirstResult vs MaxResult

Hello,

Let say we have a List with records.
Can you please detail the differences between the query.one(), query.FirstResult() and query.maxResult?

Thank you,
-n

Hello,

query.one() loads a single instance and throws IllegalStateException if nothing was loaded.
query.firstResult() sets results offset.
query.maxResult() sets results limit.

Please, see API Docs of FluentValueLoader and TransactionalDataManager

Hello,

Can you give me an example please?
If we have a list with items, what loads query.one() and what loads query.firstResult()?

Hello,

The .one() method loads a single entity.
See the examples in the DataManager section.

The .firstResults() method is not used for getting some information but for setting some integer value to manage the result list of entities. This method can be used for paging, for example.

Now it’s crystal clear.
Thank you!