You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: table=True with custom registry= stores bool in model_config and leaves model unmapped #2046
Passing table=True together with a custom registry= stores the boolean table flag into model_config["registry"] instead of the registry object, and the model is left unmapped.
In sqlmodel/main.py (SQLModelMetaclass):
config_registry=get_config("registry")
ifconfig_registryisnotUndefined:
config_registry=cast(registry, config_registry)
# If it was passed by kwargs, ensure it's also set in confignew_cls.model_config["registry"] =config_table# BUG: should be config_registrysetattr(new_cls, "_sa_registry", config_registry)
setattr(new_cls, "metadata", config_registry.metadata)
setattr(new_cls, "__abstract__", True)
Activity