-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GAE: BadRequestError: projection and keys_only cannot both be set #279
Comments
Please upgrade. You have an old version of web2py and this may have been already fixed in the newer version. |
Opsss... Sorry I did not notice the new version. Thanks a lot! |
I do not know with 100% certainty the problem is solved although I think so. Please let us know. I'd rather have a false alarm than an unchecked bug. :-) |
Sure, I will upgrade tomorrow and inform about it. Thanks a lot for the support Massimo |
Ouch... same error again with 2.9.13 too
|
The problem appears to come about because of these lines in if args_get('limitby', None):
(lmin, lmax) = attributes['limitby']
limit, fetch_args = lmax-lmin, {'offset':lmin,'keys_only':True} The adapter sets 'keys_only' on an intermediate query to implement 'limitby'. I have not studied GAE's various databases, so I don't know whether or not this is the only way to get the 'limitby' functionality. But since, in the short term, I will not be suggesting anything that requires changes to So, some choices I see which may solve your problem:
Editorial Note: For case 3), I consider the need to use the 'filterfields' attribute a bug in |
Thanks for your answer.. My reason of using projection was performance (the table stores image files, but I dont need recover them on that query). I think get all the row, with image files, is overworking.
Other posibility is remove limitby and catch the desired range after getting all the rows... I don't have any idea about performance of this versus filterfields... |
Hi,
Im using web2py 2.9.12, Im developing on local gae, and when I tried to execute this query:
I got that error
First I was playing with index.yaml automatically generated, but after reading some info about GAE and projection I have set manually an index on img_link row (pics entity) like this to be able to make the projection query on this row:
properties:
direction: desc
But still no luck... is this a bug ? Could someone give me a workaround to fix it?
The text was updated successfully, but these errors were encountered: