Merge "Use SLQAlchemy ORM "relationship" instead of "relation""
This commit is contained in:
commit
65bd4a24f5
@ -33,7 +33,7 @@ class RouterL3AgentBinding(model_base.BASEV2):
|
|||||||
router_id = sa.Column(sa.String(36),
|
router_id = sa.Column(sa.String(36),
|
||||||
sa.ForeignKey("routers.id", ondelete='CASCADE'),
|
sa.ForeignKey("routers.id", ondelete='CASCADE'),
|
||||||
primary_key=True)
|
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),
|
l3_agent_id = sa.Column(sa.String(36),
|
||||||
sa.ForeignKey("agents.id", ondelete='CASCADE'),
|
sa.ForeignKey("agents.id", ondelete='CASCADE'),
|
||||||
primary_key=True)
|
primary_key=True)
|
||||||
|
@ -33,7 +33,7 @@ class NetworkDhcpAgentBinding(model_base.BASEV2):
|
|||||||
network_id = sa.Column(sa.String(36),
|
network_id = sa.Column(sa.String(36),
|
||||||
sa.ForeignKey("networks.id", ondelete='CASCADE'),
|
sa.ForeignKey("networks.id", ondelete='CASCADE'),
|
||||||
primary_key=True)
|
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),
|
dhcp_agent_id = sa.Column(sa.String(36),
|
||||||
sa.ForeignKey("agents.id",
|
sa.ForeignKey("agents.id",
|
||||||
ondelete='CASCADE'),
|
ondelete='CASCADE'),
|
||||||
|
Loading…
Reference in New Issue
Block a user