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

Deferred loading does not seem to work with t.Annotated #672

Open
lukasjuhrich opened this issue Oct 6, 2023 · 0 comments
Open

Deferred loading does not seem to work with t.Annotated #672

lukasjuhrich opened this issue Oct 6, 2023 · 0 comments
Labels
enhancement 🔨 db-schema Things that touch the DB schema and probably require a migration.

Comments

@lukasjuhrich
Copy link
Collaborator

The deferred loading does not seem to work for passwd_hash (but it does for wifi_passwd_hash):

In [8]: from sqlalchemy import *; from sqlalchemy.orm import *; from sqlalchemy.sql import *

In [9]: from pycroft.model._all import User

In [10]: print(select(User))
SELECT "user".account_id, "user".unix_account_id, "user".address_id, "user".email_forwarded, "user".password_reset_token, "user".login, "user".name, "user".registered_at, "user".passwd_hash, "user".email, "user".email_confirmed, "user".email_confirmation_key, "user".birthdate, "user".swdd_person_id, "user".room_id, "user".id 
FROM "user"

This needs to be reported and/or quickfixed.

@lukasjuhrich lukasjuhrich added enhancement 🔨 db-schema Things that touch the DB schema and probably require a migration. labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔨 db-schema Things that touch the DB schema and probably require a migration.
Projects
None yet
Development

No branches or pull requests

1 participant