Skip to content
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

query._limit is not anymore defined in sqlalchemy #702

Open
Cabu opened this issue Sep 30, 2021 · 4 comments
Open

query._limit is not anymore defined in sqlalchemy #702

Cabu opened this issue Sep 30, 2021 · 4 comments

Comments

@Cabu
Copy link

Cabu commented Sep 30, 2021

flask_restless/views/helpers.py use query._limit who is not anymore a Query class method in sqlalchemy since 24 may 2021.

@mot3
Copy link

mot3 commented Nov 27, 2021

Yes, I have the same issue

@amanve
Copy link

amanve commented Mar 14, 2022

is it resolved?
move to - https://github.com/mrevutskyi/flask-restless-ng

@Cabu
Copy link
Author

Cabu commented Mar 15, 2022

is it resolved? move to - https://github.com/mrevutskyi/flask-restless-ng

I tried flask-restless-ng, but if my memory is still good about it, is too NG and too much change to the API to be a drop-in replacement that work :(

I 'solved' my problem by 'hotpatching' flask_sqlalchemy after its import in my main program:

import flask_sqlalchemy import SQLAlchemy, BaseQuery

def _limit(self):
    return self.limit()

setattr(BaseQuery, '_Limit', _Limit)

@amanve
Copy link

amanve commented Mar 15, 2022

it's ok if the project is old one.
but for someone new learner/project we can move to NG not an issue any is preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants