Open green3g opened 8 years ago
Hi @roemhildtg, thanks for the report. Could definitely be an issue with the pagination. Can you try with the development version, or with version 1.0.0b1, which I published on PyPI about ten days ago? If it is still an issue, can you provide a minimum working example that demonstrates the problem?
(If this is indeed specific to PostgreSQL, I now have the testing framework capable of handling PostgreSQL tests; see TestNetworkOperators
, for example.)
Tried with the development version, same result. I'll take a stab at writing a test case.
I believe the root of the problem is that Postgres views don't have a primary key. Could that have something to do with it?
Definitely could be, Flask-Restless depends pretty heavily on primary keys in various places. I'd have to spend some time looking at an example, since I haven't tested against Postgres views yet.
I've got a strange issue with retrieving results from a model that is based on an SQL view in Postgres.
Flask-Restless only returns 9 of the results in the view, even though there are over 1000 total, my
page[size] = 10
andpage[number] = 1
I have tested the model in a python console, by importing it and running
myModel.query.all()
and it returns results as expected.Another interesting note is that specifying a filter like
filter[objects]:[{"op":"==","name":"status","val":"ACTIVE"}]
returns a different set of 9 results.