Merge "Use SLQAlchemy ORM "relationship" instead of "relation""

This commit is contained in:
Zuul 2023-02-01 10:31:16 +00:00 committed by Gerrit Code Review
commit 65bd4a24f5
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ class RouterL3AgentBinding(model_base.BASEV2):
router_id = sa.Column(sa.String(36),
sa.ForeignKey("routers.id", ondelete='CASCADE'),
primary_key=True)
l3_agent = orm.relation(agent_model.Agent)
l3_agent = orm.relationship(agent_model.Agent)
l3_agent_id = sa.Column(sa.String(36),
sa.ForeignKey("agents.id", ondelete='CASCADE'),
primary_key=True)

View File

@ -33,7 +33,7 @@ class NetworkDhcpAgentBinding(model_base.BASEV2):
network_id = sa.Column(sa.String(36),
sa.ForeignKey("networks.id", ondelete='CASCADE'),
primary_key=True)
dhcp_agent = orm.relation(agent_model.Agent, lazy='subquery')
dhcp_agent = orm.relationship(agent_model.Agent, lazy='subquery')
dhcp_agent_id = sa.Column(sa.String(36),
sa.ForeignKey("agents.id",
ondelete='CASCADE'),