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

any, has on column attribute #207

Open
minyoung90 opened this issue Mar 13, 2022 · 1 comment
Open

any, has on column attribute #207

minyoung90 opened this issue Mar 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@minyoung90
Copy link

minyoung90 commented Mar 13, 2022

Describe the bug
mypy gives me,

has no attribute "any"

above error on column "User.addresses" attribute. also, "has" vise versa

stmt = (
  select(User.fullname).
  where(User.addresses.any(Address.email_address == '[email protected]'))
)
session.execute(stmt).all()

Expected behavior
No errors

To Reproduce
Please try to provide a Minimal, Complete, and Verifiable example.
See also Reporting Bugs on the website, and some example issues.

see below example on document
https://docs.sqlalchemy.org/en/14/tutorial/orm_related_objects.html#exists-forms-has-any

Please do not use Flask-SQLAlchemy or any other third-party extensions or dependencies in test cases. The test case must illustrate the problem without using any third party SQLAlchemy extensions. Otherwise, please report the bug to those projects first.

# Insert code here

Error

# Copy error here. Please include the full stack trace.

Versions.

  • OS: ubuntu 20.04 lts
  • Python: 3.9.4
  • SQLAlchemy:
  • mypy: 1.4.29
  • SQLAlchemy2-stubs: 0.0.2a20

Additional context

Have a nice day!

@minyoung90 minyoung90 added the requires triage New issue that requires categorization label Mar 13, 2022
@CaselIT CaselIT added bug Something isn't working and removed requires triage New issue that requires categorization labels Mar 14, 2022
@CaselIT
Copy link
Member

CaselIT commented Mar 14, 2022

thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants