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
This involves some refactoring and updates on almost all chapters. Not sure what is the path (update the book first or the branches). I am available to help.
What needs to be done:
Instead of importing MetaData on orm.py, you import his parent (registry):
from sqlalchemy.orm import registry
mapper_registry = registry()
On each Table, you pass as second argument mapper_registry.metadata instead of metadata. Eg.:
That doesn't sound toooo painful as a change to implement. If you really are willing to help then I'd be very grateful -- if you fork the repository chapter and get it working in there, I can do the legwork of feeding changes thru to the rest of the chapters.
registry.map_imperatively()
should be used instead.Reference: https://docs.sqlalchemy.org/en/14/orm/mapping_api.html?highlight=mapper#sqlalchemy.orm.mapper
This involves some refactoring and updates on almost all chapters. Not sure what is the path (update the book first or the branches). I am available to help.
What needs to be done:
mapper_registry.metadata
instead ofmetadata
. Eg.:mapper_registry.map_imperatively
instead ofmapper
. Eg.:The text was updated successfully, but these errors were encountered: