This message is sent to STDERR
Table 'bar.foo_id' is a foreign key to 'foo' which is not included in the graph, skipping the connection.
and the relation is missing with the following minimal example:
# Generated from a jinja2 template by topomop.
from sqlalchemy.orm import (
DeclarativeBase,
Mapped,
mapped_column
)
from sqlalchemy import (
Integer,
Column,
ForeignKey,
MetaData
)
schema_name = 'MySchema'
metadata_obj = MetaData(
schema=schema_name
)
class Base(DeclarativeBase):
metadata = metadata_obj
class Foo(Base):
__tablename__ = 'foo'
id = mapped_column(
Integer,
primary_key=True,
nullable=False,
)
class Bar(Base):
__tablename__ = 'bar'
id = mapped_column(
Integer,
primary_key=True,
nullable=False,
)
foo_id = mapped_column(
Integer,
ForeignKey('foo.id'),
nullable=False,
)
If commenting out the schema argument, the warning message to STDERR is no longer present.
metadata_obj = MetaData(
# schema=schema_name
)
This message is sent to
STDERRand the relation is missing with the following minimal example:
If commenting out the schema argument, the warning message to
STDERRis no longer present.