MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / setup_mappers

Method setup_mappers

test/ext/test_serializer.py:66–79  ·  test/ext/test_serializer.py::SerializeTest.setup_mappers
(cls)

Source from the content-addressed store, hash-verified

64
65 @classmethod
66 def setup_mappers(cls):
67 global Session
68 Session = scoped_session(sessionmaker(testing.db))
69 cls.mapper_registry.map_imperatively(
70 User,
71 users,
72 properties={
73 class="st">"addresses": relationship(
74 Address, backref=class="st">"user", order_by=addresses.c.id
75 )
76 },
77 )
78 cls.mapper_registry.map_imperatively(Address, addresses)
79 configure_mappers()
80
81 @classmethod
82 def insert_data(cls, connection):

Callers

nothing calls this directly

Calls 5

scoped_sessionClass · 0.90
sessionmakerClass · 0.90
relationshipFunction · 0.90
configure_mappersFunction · 0.90
map_imperativelyMethod · 0.80

Tested by

no test coverage detected