This is the pattern I find myself running into:
I start making an app, and I use findAll()
to get a list of [something random].
Once the app is being tested with serious data, the number of random resource instances will grow. I need to limit the number of resource instances on screen. I need to start paginating them. For this I need query string support. E.g. page[offset]
.
So findAll(criteria)
is replaced by query(criteria, querystring)
.
This is a pattern so much that findAll()
is starting to look like a development placeholder for query()
to be used later.
I'm probably misunderstanding the use for findAll()
. Is it true findAll()
cannot use pagination at all (without customizing adapter code)? Can someone explain in what cases findAll()
should be used?
Aucun commentaire:
Enregistrer un commentaire