Merge "[sqlalchemy2] Removal of cascade backrefs"

This commit is contained in:
Zuul 2023-07-07 17:53:52 +00:00 committed by Gerrit Code Review
commit 0952b629ab
2 changed files with 4 additions and 7 deletions

View File

@ -353,7 +353,8 @@ class Pool(base_models.BASE, base_models.IdMixin, base_models.ProjectMixin,
"SessionPersistence", uselist=False, cascade="delete",
back_populates="pool")
_default_listeners = orm.relationship("Listener", uselist=True,
back_populates="default_pool")
back_populates="default_pool",
cascade_backrefs=False)
l7policies = orm.relationship("L7Policy", uselist=True,
back_populates="redirect_pool")
_tags = orm.relationship(
@ -573,7 +574,8 @@ class Listener(base_models.BASE, base_models.IdMixin,
load_balancer = orm.relationship("LoadBalancer", uselist=False,
back_populates="listeners")
default_pool = orm.relationship("Pool", uselist=False,
back_populates="_default_listeners")
back_populates="_default_listeners",
cascade_backrefs=False)
sni_containers = orm.relationship(
'SNI', cascade='all,delete-orphan',
uselist=True, backref=orm.backref('listener', uselist=False))

View File

@ -44,11 +44,6 @@ class WarningsFixture(fixtures.Fixture):
message='The current statement is being autocommitted ',
category=sqla_exc.SADeprecationWarning)
warnings.filterwarnings(
'ignore',
message='.* object is being merged into a Session along the ',
category=sqla_exc.SADeprecationWarning)
warnings.filterwarnings(
'ignore',
message='The create_engine.convert_unicode parameter and ',