Skip to content

AttributeError: 'Query' object has no attribute '_join_entities' #6

@MinuraPunchihewa

Description

@MinuraPunchihewa

Hi @cs91chris,
First of all, thank you for this awesome project!

I am getting the above error, when I try to run a request against any of the model endpoints,

import os
import pyodbc
from dotenv import load_dotenv

from flask import Flask

from flask_autocrud import AutoCrud, Model
from flask_sqlalchemy import SQLAlchemy

load_dotenv()


app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = f"{os.environ.get('DB_CONN_STR')}?driver={pyodbc.drivers()[-1]}"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['AUTOCRUD_METADATA_ENABLED'] = True
app.config['AUTOCRUD_DATABASE_SCHEMA'] = os.environ.get('DB_TABLE_SCHEMA')

db = SQLAlchemy(app)

with app.app_context():
    AutoCrud(app, db)

if __name__ == '__main__':
    app.run(debug=True)

When I run a requests against the /resources endpoint I see all of the tables in my schema though.

Am I doing something wrong here?

Note: My SQLAlchemy version is 2.0.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions