<p dir="auto"><strong>Migrated issue, originally created by chrismacklin (<a href="https://github.com/chrismacklin">@chrismacklin</a>)</strong></p>
<p dir="auto">When using the association object pattern with a table with columns besides the two bridging foreign keys, the docs only gently state that association_proxy is needed.  I think this needs to be called out much more loudly and clearly in the docs, as using the secondary kwarg with an association table with extra mapped columns can cause silent corruption of the result set.  As it stands, there's just one sentence in the docs that mentions in an almost offhand fashion that if there are extra columns, you need to use association_proxy:</p>
<p dir="auto"><a href="http://docs.sqlalchemy.org/en/latest/orm/basic_relationships.html#association-object" rel="nofollow">http://docs.sqlalchemy.org/en/latest/orm/basic_relationships.html#association-object</a><br>
"The association object pattern is a variant on many-to-many: it’s used when your association table contains additional columns beyond those which are foreign keys to the left and right tables."</p>
<p dir="auto">This makes it sounds like it provides something like a nice convenience, rather than being strictly required.</p>
<p dir="auto">It would be even better if the secondary kwarg could perform some validation and refuse to map an association table that doesn't meet the requirement that the only columns on the table should be the FKs participating in the association.</p>
<p dir="auto">In my case, I had an association table with an integer primary key ID and a pair of FKs forming the association (I'll call them foo_id and bar_id), associating zero-to-many instances of Bar with a single Foo, allowing duplicate association of the same Bar multiple times to a single Foo.  Suppose I have a single instance of Foo (my_foo), with two rows in the association table to a single instance of Bar (my_bar).</p>
<p dir="auto">If my_foo.bars is declared with association_proxy, this holds:</p>
<p dir="auto">assert my_foo.bars == [my_bar, my_bar]</p>
<p dir="auto">If my_foo.bars is declared using relationship with secondary, I end up with the corrupt result set:</p>
<p dir="auto">assert my_foo.bars == [my_bar]</p>
<p dir="auto">No warning or error is emitted when creating this mapping.</p>
<p dir="auto">This seems like a pretty big footgun to me, and I think the docs need to be MUCH more clear on this.</p>
<p dir="auto">This was tested on Postgres 9.3</p>
<p dir="auto">I can produce a minimal example of this issue if it is needed.</p>
<h3 dir="auto">Describe the bug</h3>
<p dir="auto">Hello,<br>
By following the tutorial, when I execute<br>
<a href="https://docs.sqlalchemy.org/en/14/tutorial/data_select.html#:~:text=row%20%3D%20session.execute(select(User)).first()" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/data_select.html#:~:text=row%20%3D%20session.execute(select(User)).first()</a>,<br>
I got the following error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
InvalidRequestError                       Traceback (most recent call last)
(see details below)
InvalidRequestError: Multiple classes found for path &quot;Address&quot; in the registry of this declarative base. Please use a fully module-qualified path."><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">InvalidRequestError</span>                       <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
(<span class="pl-s1">see</span> <span class="pl-s1">details</span> <span class="pl-s1">below</span>)
<span class="pl-v">InvalidRequestError</span>: <span class="pl-v">Multiple</span> <span class="pl-s1">classes</span> <span class="pl-s1">found</span> <span class="pl-k">for</span> <span class="pl-s1">path</span> <span class="pl-s">"Address"</span> <span class="pl-c1">in</span> <span class="pl-s1">the</span> <span class="pl-s1">registry</span> <span class="pl-s1">of</span> <span class="pl-s1">this</span> <span class="pl-s1">declarative</span> <span class="pl-s1">base</span>. <span class="pl-v">Please</span> <span class="pl-s1">use</span> <span class="pl-s1">a</span> <span class="pl-s1">fully</span> <span class="pl-s1">module</span><span class="pl-c1">-</span><span class="pl-s1">qualified</span> <span class="pl-s1">path</span>.</pre></div>
<p dir="auto">and I found that the reason is in<br>
<a href="https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#combining-core-table-declarations-with-orm-declarative" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#combining-core-table-declarations-with-orm-declarative</a><br>
was duplicate with the code in<br>
<a href="https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#:~:text=self.fullname!r%7D)%22%0A%0A%3E%3E%3E-,class%20Address(Base)%3A,-...%20%20%20%20%20__tablename__%20%3D%20%27address%27%0A...%0A...%20%20%20%20%20id" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#:~:text=self.fullname!r%7D)%22%0A%0A%3E%3E%3E-,class%20Address(Base)%3A,-...%20%20%20%20%20__tablename__%20%3D%20%27address%27%0A...%0A...%20%20%20%20%20id</a><br>
how do I fix this? should the tutorial be modified too? (e.g. add a warning)</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# %%
from sqlalchemy.orm import registry

mapper_registry = registry()
Base = mapper_registry.generate_base()

from sqlalchemy import select
from sqlalchemy import Table, Column, Integer, String
from sqlalchemy import ForeignKey

from sqlalchemy.orm import relationship
from sqlalchemy.orm import Session

from sqlalchemy import create_engine

engine = create_engine(&quot;sqlite+pysqlite:///:memory:&quot;, echo=True, future=True)


class User(Base):
    __tablename__ = &quot;user_account&quot;
    id = Column(Integer, primary_key=True)
    name = Column(String(30))
    fullname = Column(String)
    addresses = relationship(&quot;Address&quot;, back_populates=&quot;user&quot;)

    def __repr__(self):
        return (
            f&quot;User(id={self.id!r},&quot;
            f&quot; name={self.name!r},&quot;
            f&quot; fullname={self.fullname!r})&quot;
        )


class Address(Base):
    __tablename__ = &quot;address&quot;
    id = Column(Integer, primary_key=True)
    email_address = Column(String, nullable=False)
    user_id = Column(Integer, ForeignKey(&quot;user_account.id&quot;))
    user = relationship(&quot;User&quot;, back_populates=&quot;addresses&quot;)

    def __repr__(self):
        return f&quot;Address(id={self.id!r},&quot; f&quot; email_address=&quot; f&quot;{self.email_address!r})&quot;



# %%
mapper_registry.metadata.create_all(engine)

# %%
from sqlalchemy import MetaData

metadata_obj = MetaData()

user_table = Table(
    &quot;user_account&quot;,
    metadata_obj,
    Column(&quot;id&quot;, Integer, primary_key=True),
    Column(&quot;name&quot;, String(30)),
    Column(&quot;fullname&quot;, String),
)

address_table = Table(
    &quot;address&quot;,
    metadata_obj,
    Column(&quot;id&quot;, Integer, primary_key=True),
    Column(&quot;user_id&quot;, ForeignKey(&quot;user_account.id&quot;), nullable=False),
    Column(&quot;email_address&quot;, String, nullable=False),
)
metadata_obj.create_all(engine)


# %%
from sqlalchemy import insert
stmt = insert(user_table).\
    values(name='spongebob', 
    fullname=&quot;Spongebob Squarepants&quot;)

# %%
from sqlalchemy import select, bindparam

scalar_subq = (
    select(user_table.c.id)
    .where(user_table.c.name == bindparam(&quot;username&quot;))
    .scalar_subquery()
)

with engine.connect() as conn:
    result = conn.execute(
        insert(address_table).values(user_id=scalar_subq),
        [
            {&quot;username&quot;: &quot;spongebob&quot;, &quot;email_address&quot;: &quot;spongebob@sqlalchemy.org&quot;},
            {&quot;username&quot;: &quot;sandy&quot;, &quot;email_address&quot;: &quot;sandy@sqlalchemy.org&quot;},
            {&quot;username&quot;: &quot;sandy&quot;, &quot;email_address&quot;: &quot;sandy@squirrelpower.org&quot;},
        ],
    )
    conn.commit()

# %%
stmt = select(User).where(User.name == 'spongebob')
with Session(engine) as session:
    for row in session.execute(stmt):
        print(row)

# %%
class User(Base):
    __table__ = user_table

    addresses = relationship(&quot;Address&quot;, back_populates=&quot;user&quot;)

    def __repr__(self):
        return f&quot;User({self.name!r}, {self.fullname!r})&quot;


class Address(Base):
    __table__ = address_table

    user = relationship(&quot;User&quot;, back_populates=&quot;addresses&quot;)

    def __repr__(self):
        return f&quot;Address({self.email_address!r})&quot;

# %%
stmt = select(User).where(User.name == 'spongebob')
with Session(engine) as session:
    for row in session.execute(stmt):
        print(row)"><pre class="notranslate"><span class="pl-c"># %%</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-s1">registry</span>

<span class="pl-s1">mapper_registry</span> <span class="pl-c1">=</span> <span class="pl-en">registry</span>()
<span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-s1">mapper_registry</span>.<span class="pl-en">generate_base</span>()

<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">select</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">Table</span>, <span class="pl-v">Column</span>, <span class="pl-v">Integer</span>, <span class="pl-v">String</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">ForeignKey</span>

<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-s1">relationship</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-v">Session</span>

<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">create_engine</span>

<span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">"sqlite+pysqlite:///:memory:"</span>, <span class="pl-s1">echo</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">future</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)


<span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Base</span>):
    <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"user_account"</span>
    <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
    <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>(<span class="pl-c1">30</span>))
    <span class="pl-s1">fullname</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>)
    <span class="pl-s1">addresses</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"Address"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"user"</span>)

    <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>):
        <span class="pl-k">return</span> (
            <span class="pl-s">f"User(id=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">id</span>!r<span class="pl-kos">}</span></span>,"</span>
            <span class="pl-s">f" name=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">name</span>!r<span class="pl-kos">}</span></span>,"</span>
            <span class="pl-s">f" fullname=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">fullname</span>!r<span class="pl-kos">}</span></span>)"</span>
        )


<span class="pl-k">class</span> <span class="pl-v">Address</span>(<span class="pl-v">Base</span>):
    <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"address"</span>
    <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
    <span class="pl-s1">email_address</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
    <span class="pl-s1">user_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-v">ForeignKey</span>(<span class="pl-s">"user_account.id"</span>))
    <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"User"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"addresses"</span>)

    <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>):
        <span class="pl-k">return</span> <span class="pl-s">f"Address(id=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">id</span>!r<span class="pl-kos">}</span></span>,"</span> <span class="pl-s">f" email_address="</span> <span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">email_address</span>!r<span class="pl-kos">}</span></span>)"</span>



<span class="pl-c"># %%</span>
<span class="pl-s1">mapper_registry</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>)

<span class="pl-c"># %%</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">MetaData</span>

<span class="pl-s1">metadata_obj</span> <span class="pl-c1">=</span> <span class="pl-v">MetaData</span>()

<span class="pl-s1">user_table</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>(
    <span class="pl-s">"user_account"</span>,
    <span class="pl-s1">metadata_obj</span>,
    <span class="pl-v">Column</span>(<span class="pl-s">"id"</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
    <span class="pl-v">Column</span>(<span class="pl-s">"name"</span>, <span class="pl-v">String</span>(<span class="pl-c1">30</span>)),
    <span class="pl-v">Column</span>(<span class="pl-s">"fullname"</span>, <span class="pl-v">String</span>),
)

<span class="pl-s1">address_table</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>(
    <span class="pl-s">"address"</span>,
    <span class="pl-s1">metadata_obj</span>,
    <span class="pl-v">Column</span>(<span class="pl-s">"id"</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
    <span class="pl-v">Column</span>(<span class="pl-s">"user_id"</span>, <span class="pl-v">ForeignKey</span>(<span class="pl-s">"user_account.id"</span>), <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>),
    <span class="pl-v">Column</span>(<span class="pl-s">"email_address"</span>, <span class="pl-v">String</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>),
)
<span class="pl-s1">metadata_obj</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>)


<span class="pl-c"># %%</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">insert</span>
<span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">insert</span>(<span class="pl-s1">user_table</span>).\
    <span class="pl-en">values</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'spongebob'</span>, 
    <span class="pl-s1">fullname</span><span class="pl-c1">=</span><span class="pl-s">"Spongebob Squarepants"</span>)

<span class="pl-c"># %%</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">select</span>, <span class="pl-s1">bindparam</span>

<span class="pl-s1">scalar_subq</span> <span class="pl-c1">=</span> (
    <span class="pl-en">select</span>(<span class="pl-s1">user_table</span>.<span class="pl-s1">c</span>.<span class="pl-s1">id</span>)
    .<span class="pl-en">where</span>(<span class="pl-s1">user_table</span>.<span class="pl-s1">c</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-en">bindparam</span>(<span class="pl-s">"username"</span>))
    .<span class="pl-en">scalar_subquery</span>()
)

<span class="pl-k">with</span> <span class="pl-s1">engine</span>.<span class="pl-en">connect</span>() <span class="pl-k">as</span> <span class="pl-s1">conn</span>:
    <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">conn</span>.<span class="pl-en">execute</span>(
        <span class="pl-en">insert</span>(<span class="pl-s1">address_table</span>).<span class="pl-en">values</span>(<span class="pl-s1">user_id</span><span class="pl-c1">=</span><span class="pl-s1">scalar_subq</span>),
        [
            {<span class="pl-s">"username"</span>: <span class="pl-s">"spongebob"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"spongebob@sqlalchemy.org"</span>},
            {<span class="pl-s">"username"</span>: <span class="pl-s">"sandy"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"sandy@sqlalchemy.org"</span>},
            {<span class="pl-s">"username"</span>: <span class="pl-s">"sandy"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"sandy@squirrelpower.org"</span>},
        ],
    )
    <span class="pl-s1">conn</span>.<span class="pl-en">commit</span>()

<span class="pl-c"># %%</span>
<span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>)
<span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</span>:
    <span class="pl-k">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>):
        <span class="pl-en">print</span>(<span class="pl-s1">row</span>)

<span class="pl-c"># %%</span>
<span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Base</span>):
    <span class="pl-s1">__table__</span> <span class="pl-c1">=</span> <span class="pl-s1">user_table</span>

    <span class="pl-s1">addresses</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"Address"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"user"</span>)

    <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>):
        <span class="pl-k">return</span> <span class="pl-s">f"User(<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">name</span>!r<span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">fullname</span>!r<span class="pl-kos">}</span></span>)"</span>


<span class="pl-k">class</span> <span class="pl-v">Address</span>(<span class="pl-v">Base</span>):
    <span class="pl-s1">__table__</span> <span class="pl-c1">=</span> <span class="pl-s1">address_table</span>

    <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"User"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"addresses"</span>)

    <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>):
        <span class="pl-k">return</span> <span class="pl-s">f"Address(<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">email_address</span>!r<span class="pl-kos">}</span></span>)"</span>

<span class="pl-c"># %%</span>
<span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>)
<span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</span>:
    <span class="pl-k">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>):
        <span class="pl-en">print</span>(<span class="pl-s1">row</span>)</pre></div>
<h3 dir="auto">Error</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
InvalidRequestError                       Traceback (most recent call last)
c:\Users\18463\Documents\GitHub\learn-orm\bug-report.ipynb Cell 9' in &lt;cell line: 2&gt;()
      1 stmt = select(User).where(User.name == 'spongebob')
      2 with Session(engine) as session:
----&gt; 3     for row in session.execute(stmt):
      4         print(row)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\session.py:1692, in Session.execute(self, statement, params, execution_options, bind_arguments, _parent_execute_state, _add_event, **kw)
   1690 else:
   1691     conn = self._connection_for_bind(bind)
-&gt; 1692 result = conn._execute_20(statement, params or {}, execution_options)
   1694 if compile_state_cls:
   1695     result = compile_state_cls.orm_setup_cursor_result(
   1696         self,
   1697         statement,
   (...)
   1701         result,
   1702     )

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\engine\base.py:1620, in Connection._execute_20(self, statement, parameters, execution_options)
   1616     util.raise_(
   1617         exc.ObjectNotExecutableError(statement), replace_context=err
   1618     )
   1619 else:
-&gt; 1620     return meth(self, args_10style, kwargs_10style, execution_options)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:325, in ClauseElement._execute_on_connection(self, connection, multiparams, params, execution_options, _force)
    321 def _execute_on_connection(
    322     self, connection, multiparams, params, execution_options, _force=False
    323 ):
    324     if _force or self.supports_execution:
--&gt; 325         return connection._execute_clauseelement(
    326             self, multiparams, params, execution_options
    327         )
    328     else:
    329         raise exc.ObjectNotExecutableError(self)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\engine\base.py:1479, in Connection._execute_clauseelement(self, elem, multiparams, params, execution_options)
   1471 schema_translate_map = execution_options.get(
   1472     &quot;schema_translate_map&quot;, None
   1473 )
   1475 compiled_cache = execution_options.get(
   1476     &quot;compiled_cache&quot;, self.engine._compiled_cache
   1477 )
-&gt; 1479 compiled_sql, extracted_params, cache_hit = elem._compile_w_cache(
   1480     dialect=dialect,
   1481     compiled_cache=compiled_cache,
   1482     column_keys=keys,
   1483     for_executemany=for_executemany,
   1484     schema_translate_map=schema_translate_map,
   1485     linting=self.dialect.compiler_linting | compiler.WARN_LINTING,
   1486 )
   1487 ret = self._execute_context(
   1488     dialect,
   1489     dialect.execution_ctx_cls._init_compiled,
   (...)
   1497     cache_hit=cache_hit,
   1498 )
   1499 if has_events:

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:523, in ClauseElement._compile_w_cache(self, dialect, compiled_cache, column_keys, for_executemany, schema_translate_map, **kw)
    521 if compiled_sql is None:
    522     cache_hit = dialect.CACHE_MISS
--&gt; 523     compiled_sql = self._compiler(
    524         dialect,
    525         cache_key=elem_cache_key,
    526         column_keys=column_keys,
    527         for_executemany=for_executemany,
    528         schema_translate_map=schema_translate_map,
    529         **kw
    530     )
    531     compiled_cache[key] = compiled_sql
    532 else:

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:558, in ClauseElement._compiler(self, dialect, **kw)
    554 def _compiler(self, dialect, **kw):
    555     &quot;&quot;&quot;Return a compiler appropriate for this ClauseElement, given a
    556     Dialect.&quot;&quot;&quot;
--&gt; 558     return dialect.statement_compiler(dialect, self, **kw)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:776, in SQLCompiler.__init__(self, dialect, statement, cache_key, column_keys, for_executemany, linting, **kwargs)
    772 # a map which tracks &quot;truncated&quot; names based on
    773 # dialect.label_length or dialect.max_identifier_length
    774 self.truncated_names = {}
--&gt; 776 Compiled.__init__(self, dialect, statement, **kwargs)
    778 if self.isinsert or self.isupdate or self.isdelete:
    779     if statement._returning:

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:451, in Compiled.__init__(self, dialect, statement, schema_translate_map, render_schema_translate, compile_kwargs)
    449 if self.can_execute:
    450     self.execution_options = statement._execution_options
--&gt; 451 self.string = self.process(self.statement, **compile_kwargs)
    453 if render_schema_translate:
    454     self.string = self.preparer._render_schema_translates(
    455         self.string, schema_translate_map
    456     )

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:486, in Compiled.process(self, obj, **kwargs)
    485 def process(self, obj, **kwargs):
--&gt; 486     return obj._compiler_dispatch(self, **kwargs)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\visitors.py:82, in _generate_compiler_dispatch.&lt;locals&gt;._compiler_dispatch(self, visitor, **kw)
     79     return visitor.visit_unsupported_compilation(self, err, **kw)
     81 else:
---&gt; 82     return meth(self, **kw)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:3261, in SQLCompiler.visit_select(self, select_stmt, asfrom, insert_into, fromhints, compound_index, select_wraps_for, lateral, from_linter, **kwargs)
   3253 # initial setup of SELECT.  the compile_state_factory may now
   3254 # be creating a totally different SELECT from the one that was
   3255 # passed in.  for ORM use this will convert from an ORM-state
   3256 # SELECT to a regular &quot;Core&quot; SELECT.  other composed operations
   3257 # such as computation of joins will be performed.
   3259 kwargs[&quot;within_columns_clause&quot;] = False
-&gt; 3261 compile_state = select_stmt._compile_state_factory(
   3262     select_stmt, self, **kwargs
   3263 )
   3264 select_stmt = compile_state.statement
   3266 toplevel = not self.stack

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\base.py:510, in CompileState.create_for_statement(cls, statement, compiler, **kw)
    508     return cls(statement, compiler, **kw)
    509 else:
--&gt; 510     return klass.create_for_statement(statement, compiler, **kw)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:696, in ORMSelectCompileState.create_for_statement(cls, statement, compiler, **kw)
    683 if select_statement._memoized_select_entities:
    684     self._memoized_entities = {
    685         memoized_entities: _QueryEntity.to_compile_state(
    686             self,
   (...)
    693         )
    694     }
--&gt; 696 _QueryEntity.to_compile_state(
    697     self,
    698     select_statement._raw_columns,
    699     self._entities,
    700     is_current_entities=True,
    701 )
    703 self.current_path = select_statement._compile_options._current_path
    705 self.eager_order_by = ()

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:2432, in _QueryEntity.to_compile_state(cls, compile_state, entities, entities_collection, is_current_entities)
   2430 if entity.is_selectable:
   2431     if &quot;parententity&quot; in entity._annotations:
-&gt; 2432         _MapperEntity(
   2433             compile_state,
   2434             entity,
   2435             entities_collection,
   2436             is_current_entities,
   2437         )
   2438     else:
   2439         _ColumnEntity._for_columns(
   2440             compile_state,
   2441             entity._select_iterable,
   2442             entities_collection,
   2443             idx,
   2444         )

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:2496, in _MapperEntity.__init__(self, compile_state, entity, entities_collection, is_current_entities)
   2493     compile_state._has_orm_entities = True
   2495 entity = entity._annotations[&quot;parententity&quot;]
-&gt; 2496 entity._post_inspect
   2497 ext_info = self.entity_zero = entity
   2498 entity = ext_info.entity

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\langhelpers.py:1180, in HasMemoized.memoized_attribute.__get__(self, obj, cls)
   1178 if obj is None:
   1179     return self
-&gt; 1180 obj.__dict__[self.__name__] = result = self.fget(obj)
   1181 obj._memoized_keys |= {self.__name__}
   1182 return result

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:2123, in Mapper._post_inspect(self)
   2112 @HasMemoized.memoized_attribute
   2113 def _post_inspect(self):
   2114     &quot;&quot;&quot;This hook is invoked by attribute inspection.
   2115 
   2116     E.g. when Query calls:
   (...)
   2121 
   2122     &quot;&quot;&quot;
-&gt; 2123     self._check_configure()

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:1900, in Mapper._check_configure(self)
   1898 def _check_configure(self):
   1899     if self.registry._new_mappers:
-&gt; 1900         _configure_registries({self.registry}, cascade=True)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:3418, in _configure_registries(registries, cascade)
   3412     Mapper.dispatch._for_class(Mapper).before_configured()
   3413     # initialize properties on all mappers
   3414     # note that _mapper_registry is unordered, which
   3415     # may randomly conceal/reveal issues related to
   3416     # the order of mapper compilation
-&gt; 3418     _do_configure_registries(registries, cascade)
   3419 finally:
   3420     _already_compiling = False

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:3457, in _do_configure_registries(registries, cascade)
   3455 if not mapper.configured:
   3456     try:
-&gt; 3457         mapper._post_configure_properties()
   3458         mapper._expire_memoizations()
   3459         mapper.dispatch.mapper_configured(mapper, mapper.class_)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:1917, in Mapper._post_configure_properties(self)
   1914 self._log(&quot;initialize prop %s&quot;, key)
   1916 if prop.parent is self and not prop._configure_started:
-&gt; 1917     prop.init()
   1919 if prop._configure_finished:
   1920     prop.post_instrument_class(self)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\interfaces.py:231, in MapperProperty.init(self)
    224 &quot;&quot;&quot;Called after all mappers are created to assemble
    225 relationships between mappers and perform other post-mapper-creation
    226 initialization steps.
    227 
    228 
    229 &quot;&quot;&quot;
    230 self._configure_started = True
--&gt; 231 self.do_init()
    232 self._configure_finished = True

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2150, in RelationshipProperty.do_init(self)
   2148 def do_init(self):
   2149     self._check_conflicts()
-&gt; 2150     self._process_dependent_arguments()
   2151     self._setup_registry_dependencies()
   2152     self._setup_join_conditions()

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2245, in RelationshipProperty._process_dependent_arguments(self)
   2231 self._user_defined_foreign_keys = util.column_set(
   2232     coercions.expect(
   2233         roles.ColumnArgumentRole, x, argname=&quot;foreign_keys&quot;
   2234     )
   2235     for x in util.to_column_set(self._user_defined_foreign_keys)
   2236 )
   2238 self.remote_side = util.column_set(
   2239     coercions.expect(
   2240         roles.ColumnArgumentRole, x, argname=&quot;remote_side&quot;
   2241     )
   2242     for x in util.to_column_set(self.remote_side)
   2243 )
-&gt; 2245 self.target = self.entity.persist_selectable

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\langhelpers.py:1113, in memoized_property.__get__(self, obj, cls)
   1111 if obj is None:
   1112     return self
-&gt; 1113 obj.__dict__[self.__name__] = result = self.fget(obj)
   1114 return result

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2112, in RelationshipProperty.entity(self)
   2109 mapperlib = util.preloaded.orm_mapper
   2111 if isinstance(self.argument, util.string_types):
-&gt; 2112     argument = self._clsregistry_resolve_name(self.argument)()
   2114 elif callable(self.argument) and not isinstance(
   2115     self.argument, (type, mapperlib.Mapper)
   2116 ):
   2117     argument = self.argument()

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:393, in _class_resolver._resolve_name(self)
    391 for token in name.split(&quot;.&quot;):
    392     if rval is None:
--&gt; 393         rval = d[token]
    394     else:
    395         rval = getattr(rval, token)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\_collections.py:746, in PopulateDict.__missing__(self, key)
    745 def __missing__(self, key):
--&gt; 746     self[key] = val = self.creator(key)
    747     return val

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:352, in _class_resolver._access_cls(self, key)
    349         return _GetTable(key, cls.metadata)
    351 if key in decl_class_registry:
--&gt; 352     return _determine_container(key, decl_class_registry[key])
    354 if not self.favor_tables:
    355     if key in metadata.tables:

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:313, in _determine_container(key, value)
    311 def _determine_container(key, value):
    312     if isinstance(value, _MultipleClassMarker):
--&gt; 313         value = value.attempt_get([], key)
    314     return _GetColumns(value)

File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:144, in _MultipleClassMarker.attempt_get(self, path, key)
    142 def attempt_get(self, path, key):
    143     if len(self.contents) &gt; 1:
--&gt; 144         raise exc.InvalidRequestError(
    145             'Multiple classes found for path &quot;%s&quot; '
    146             &quot;in the registry of this declarative &quot;
    147             &quot;base. Please use a fully module-qualified path.&quot;
    148             % (&quot;.&quot;.join(path + [key]))
    149         )
    150     else:
    151         ref = list(self.contents)[0]

InvalidRequestError: Multiple classes found for path &quot;Address&quot; in the registry of this declarative base. Please use a fully module-qualified path."><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">InvalidRequestError</span>                       <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-s1">c</span>:\U<span class="pl-s1">sers</span>\1<span class="pl-c1">8463</span>\D<span class="pl-s1">ocuments</span>\G<span class="pl-s1">itHub</span>\l<span class="pl-s1">earn</span><span class="pl-c1">-</span><span class="pl-s1">orm</span>\b<span class="pl-s1">ug</span><span class="pl-c1">-</span><span class="pl-s1">report</span>.<span class="pl-s1">ipynb</span> <span class="pl-v">Cell</span> <span class="pl-c1">9</span>' <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">cell</span> <span class="pl-s1">line</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>()
      <span class="pl-c1">1</span> <span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>)
      <span class="pl-c1">2</span> <span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3</span>     <span class="pl-s1">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>):
      <span class="pl-c1">4</span>         <span class="pl-en">print</span>(<span class="pl-s1">row</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\s<span class="pl-s1">ession</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1692</span>, <span class="pl-c1">in</span> <span class="pl-v">Session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">self</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">bind_arguments</span>, <span class="pl-s1">_parent_execute_state</span>, <span class="pl-s1">_add_event</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
   <span class="pl-c1">1690</span> <span class="pl-s1">else</span>:
   <span class="pl-c1">1691</span>     <span class="pl-s1">conn</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_connection_for_bind</span>(<span class="pl-s1">bind</span>)
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1692</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">conn</span>.<span class="pl-en">_execute_20</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">params</span> <span class="pl-c1">or</span> {}, <span class="pl-s1">execution_options</span>)
   <span class="pl-c1">1694</span> <span class="pl-k">if</span> <span class="pl-s1">compile_state_cls</span>:
   <span class="pl-c1">1695</span>     <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">compile_state_cls</span>.<span class="pl-en">orm_setup_cursor_result</span>(
   <span class="pl-c1">1696</span>         <span class="pl-s1">self</span>,
   <span class="pl-c1">1697</span>         <span class="pl-s1">statement</span>,
   (...)
   <span class="pl-c1">1701</span>         <span class="pl-s1">result</span>,
   <span class="pl-c1">1702</span>     )

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\e<span class="pl-s1">ngine</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1620</span>, <span class="pl-c1">in</span> <span class="pl-v">Connection</span>.<span class="pl-en">_execute_20</span>(<span class="pl-s1">self</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">parameters</span>, <span class="pl-s1">execution_options</span>)
   <span class="pl-c1">1616</span>     <span class="pl-s1">util</span>.<span class="pl-en">raise_</span>(
   <span class="pl-c1">1617</span>         <span class="pl-s1">exc</span>.<span class="pl-v">ObjectNotExecutableError</span>(<span class="pl-s1">statement</span>), <span class="pl-s1">replace_context</span><span class="pl-c1">=</span><span class="pl-s1">err</span>
   <span class="pl-c1">1618</span>     )
   <span class="pl-c1">1619</span> <span class="pl-k">else</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">1620</span>     <span class="pl-s1">return</span> <span class="pl-en">meth</span>(<span class="pl-s1">self</span>, <span class="pl-s1">args_10style</span>, <span class="pl-s1">kwargs_10style</span>, <span class="pl-s1">execution_options</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">325</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_execute_on_connection</span>(<span class="pl-s1">self</span>, <span class="pl-s1">connection</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">_force</span>)
    <span class="pl-c1">321</span> <span class="pl-s1">def</span> <span class="pl-en">_execute_on_connection</span>(
    <span class="pl-c1">322</span>     <span class="pl-s1">self</span>, <span class="pl-s1">connection</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">_force</span><span class="pl-c1">=</span><span class="pl-c1">False</span>
    <span class="pl-c1">323</span> ):
    <span class="pl-c1">324</span>     <span class="pl-k">if</span> <span class="pl-s1">_force</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">supports_execution</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">325</span>         <span class="pl-s1">return</span> <span class="pl-s1">connection</span>.<span class="pl-en">_execute_clauseelement</span>(
    <span class="pl-c1">326</span>             <span class="pl-s1">self</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>
    <span class="pl-c1">327</span>         )
    <span class="pl-c1">328</span>     <span class="pl-k">else</span>:
    <span class="pl-c1">329</span>         <span class="pl-s1">raise</span> <span class="pl-s1">exc</span>.<span class="pl-v">ObjectNotExecutableError</span>(<span class="pl-s1">self</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\e<span class="pl-s1">ngine</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1479</span>, <span class="pl-c1">in</span> <span class="pl-v">Connection</span>.<span class="pl-en">_execute_clauseelement</span>(<span class="pl-s1">self</span>, <span class="pl-s1">elem</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>)
   <span class="pl-c1">1471</span> <span class="pl-s1">schema_translate_map</span> <span class="pl-c1">=</span> <span class="pl-s1">execution_options</span>.<span class="pl-en">get</span>(
   <span class="pl-c1">1472</span>     <span class="pl-s">"schema_translate_map"</span>, <span class="pl-c1">None</span>
   <span class="pl-c1">1473</span> )
   <span class="pl-c1">1475</span> <span class="pl-s1">compiled_cache</span> <span class="pl-c1">=</span> <span class="pl-s1">execution_options</span>.<span class="pl-en">get</span>(
   <span class="pl-c1">1476</span>     <span class="pl-s">"compiled_cache"</span>, <span class="pl-s1">self</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">_compiled_cache</span>
   <span class="pl-c1">1477</span> )
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1479</span> <span class="pl-s1">compiled_sql</span>, <span class="pl-s1">extracted_params</span>, <span class="pl-s1">cache_hit</span> <span class="pl-c1">=</span> <span class="pl-s1">elem</span>.<span class="pl-en">_compile_w_cache</span>(
   <span class="pl-c1">1480</span>     <span class="pl-s1">dialect</span><span class="pl-c1">=</span><span class="pl-s1">dialect</span>,
   <span class="pl-c1">1481</span>     <span class="pl-s1">compiled_cache</span><span class="pl-c1">=</span><span class="pl-s1">compiled_cache</span>,
   <span class="pl-c1">1482</span>     <span class="pl-s1">column_keys</span><span class="pl-c1">=</span><span class="pl-s1">keys</span>,
   <span class="pl-c1">1483</span>     <span class="pl-s1">for_executemany</span><span class="pl-c1">=</span><span class="pl-s1">for_executemany</span>,
   <span class="pl-c1">1484</span>     <span class="pl-s1">schema_translate_map</span><span class="pl-c1">=</span><span class="pl-s1">schema_translate_map</span>,
   <span class="pl-c1">1485</span>     <span class="pl-s1">linting</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">dialect</span>.<span class="pl-s1">compiler_linting</span> <span class="pl-c1">|</span> <span class="pl-s1">compiler</span>.<span class="pl-v">WARN_LINTING</span>,
   <span class="pl-c1">1486</span> )
   <span class="pl-c1">1487</span> <span class="pl-s1">ret</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_execute_context</span>(
   <span class="pl-c1">1488</span>     <span class="pl-s1">dialect</span>,
   <span class="pl-c1">1489</span>     <span class="pl-s1">dialect</span>.<span class="pl-s1">execution_ctx_cls</span>.<span class="pl-s1">_init_compiled</span>,
   (...)
   <span class="pl-c1">1497</span>     <span class="pl-s1">cache_hit</span><span class="pl-c1">=</span><span class="pl-s1">cache_hit</span>,
   <span class="pl-c1">1498</span> )
   <span class="pl-c1">1499</span> <span class="pl-k">if</span> <span class="pl-s1">has_events</span>:

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">523</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_compile_w_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">compiled_cache</span>, <span class="pl-s1">column_keys</span>, <span class="pl-s1">for_executemany</span>, <span class="pl-s1">schema_translate_map</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
    <span class="pl-c1">521</span> <span class="pl-k">if</span> <span class="pl-s1">compiled_sql</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
    <span class="pl-c1">522</span>     <span class="pl-s1">cache_hit</span> <span class="pl-c1">=</span> <span class="pl-s1">dialect</span>.<span class="pl-v">CACHE_MISS</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">523</span>     <span class="pl-s1">compiled_sql</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_compiler</span>(
    <span class="pl-c1">524</span>         <span class="pl-s1">dialect</span>,
    <span class="pl-c1">525</span>         <span class="pl-s1">cache_key</span><span class="pl-c1">=</span><span class="pl-s1">elem_cache_key</span>,
    <span class="pl-c1">526</span>         <span class="pl-s1">column_keys</span><span class="pl-c1">=</span><span class="pl-s1">column_keys</span>,
    <span class="pl-c1">527</span>         <span class="pl-s1">for_executemany</span><span class="pl-c1">=</span><span class="pl-s1">for_executemany</span>,
    <span class="pl-c1">528</span>         <span class="pl-s1">schema_translate_map</span><span class="pl-c1">=</span><span class="pl-s1">schema_translate_map</span>,
    <span class="pl-c1">529</span>         <span class="pl-c1">**</span><span class="pl-s1">kw</span>
    <span class="pl-c1">530</span>     )
    <span class="pl-c1">531</span>     <span class="pl-s1">compiled_cache</span>[<span class="pl-s1">key</span>] <span class="pl-c1">=</span> <span class="pl-s1">compiled_sql</span>
    <span class="pl-c1">532</span> <span class="pl-k">else</span>:

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">558</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_compiler</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
    <span class="pl-c1">554</span> <span class="pl-s1">def</span> <span class="pl-en">_compiler</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>):
    <span class="pl-c1">555</span>     <span class="pl-s">"""Return a compiler appropriate for this ClauseElement, given a</span>
<span class="pl-s">    556     Dialect."""</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">558</span>     <span class="pl-s1">return</span> <span class="pl-s1">dialect</span>.<span class="pl-en">statement_compiler</span>(<span class="pl-s1">dialect</span>, <span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">776</span>, <span class="pl-c1">in</span> <span class="pl-v">SQLCompiler</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">cache_key</span>, <span class="pl-s1">column_keys</span>, <span class="pl-s1">for_executemany</span>, <span class="pl-s1">linting</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">772</span> <span class="pl-c"># a map which tracks "truncated" names based on</span>
    <span class="pl-c1">773</span> <span class="pl-c"># dialect.label_length or dialect.max_identifier_length</span>
    <span class="pl-c1">774</span> <span class="pl-s1">self</span>.<span class="pl-s1">truncated_names</span> <span class="pl-c1">=</span> {}
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">776</span> <span class="pl-v">Compiled</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">778</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">isinsert</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">isupdate</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">isdelete</span>:
    <span class="pl-c1">779</span>     <span class="pl-k">if</span> <span class="pl-s1">statement</span>.<span class="pl-s1">_returning</span>:

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">451</span>, <span class="pl-c1">in</span> <span class="pl-v">Compiled</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">schema_translate_map</span>, <span class="pl-s1">render_schema_translate</span>, <span class="pl-s1">compile_kwargs</span>)
    <span class="pl-c1">449</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">can_execute</span>:
    <span class="pl-c1">450</span>     <span class="pl-s1">self</span>.<span class="pl-s1">execution_options</span> <span class="pl-c1">=</span> <span class="pl-s1">statement</span>.<span class="pl-s1">_execution_options</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">451</span> <span class="pl-s1">self</span>.<span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">process</span>(<span class="pl-s1">self</span>.<span class="pl-s1">statement</span>, <span class="pl-c1">**</span><span class="pl-s1">compile_kwargs</span>)
    <span class="pl-c1">453</span> <span class="pl-k">if</span> <span class="pl-s1">render_schema_translate</span>:
    <span class="pl-c1">454</span>     <span class="pl-s1">self</span>.<span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">preparer</span>.<span class="pl-en">_render_schema_translates</span>(
    <span class="pl-c1">455</span>         <span class="pl-s1">self</span>.<span class="pl-s1">string</span>, <span class="pl-s1">schema_translate_map</span>
    <span class="pl-c1">456</span>     )

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">486</span>, <span class="pl-c1">in</span> <span class="pl-v">Compiled</span>.<span class="pl-en">process</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">485</span> <span class="pl-k">def</span> <span class="pl-en">process</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">486</span>     <span class="pl-s1">return</span> <span class="pl-s1">obj</span>.<span class="pl-en">_compiler_dispatch</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\v<span class="pl-s1">isitors</span>.<span class="pl-s1">py</span>:<span class="pl-c1">82</span>, <span class="pl-c1">in</span> <span class="pl-s1">_generate_compiler_dispatch</span>.<span class="pl-c1">&lt;</span><span class="pl-s1">locals</span><span class="pl-c1">&gt;</span>.<span class="pl-en">_compiler_dispatch</span>(<span class="pl-s1">self</span>, <span class="pl-s1">visitor</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
     <span class="pl-c1">79</span>     <span class="pl-s1">return</span> <span class="pl-s1">visitor</span>.<span class="pl-en">visit_unsupported_compilation</span>(<span class="pl-s1">self</span>, <span class="pl-s1">err</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
     <span class="pl-c1">81</span> <span class="pl-k">else</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">82</span>     <span class="pl-s1">return</span> <span class="pl-en">meth</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3261</span>, <span class="pl-c1">in</span> <span class="pl-v">SQLCompiler</span>.<span class="pl-en">visit_select</span>(<span class="pl-s1">self</span>, <span class="pl-s1">select_stmt</span>, <span class="pl-s1">asfrom</span>, <span class="pl-s1">insert_into</span>, <span class="pl-s1">fromhints</span>, <span class="pl-s1">compound_index</span>, <span class="pl-s1">select_wraps_for</span>, <span class="pl-s1">lateral</span>, <span class="pl-s1">from_linter</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
   <span class="pl-c1">3253</span> <span class="pl-c"># initial setup of SELECT.  the compile_state_factory may now</span>
   <span class="pl-c1">3254</span> <span class="pl-c"># be creating a totally different SELECT from the one that was</span>
   <span class="pl-c1">3255</span> <span class="pl-c"># passed in.  for ORM use this will convert from an ORM-state</span>
   <span class="pl-c1">3256</span> <span class="pl-c"># SELECT to a regular "Core" SELECT.  other composed operations</span>
   <span class="pl-c1">3257</span> <span class="pl-c"># such as computation of joins will be performed.</span>
   <span class="pl-c1">3259</span> <span class="pl-s1">kwargs</span>[<span class="pl-s">"within_columns_clause"</span>] <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3261</span> <span class="pl-s1">compile_state</span> <span class="pl-c1">=</span> <span class="pl-s1">select_stmt</span>.<span class="pl-en">_compile_state_factory</span>(
   <span class="pl-c1">3262</span>     <span class="pl-s1">select_stmt</span>, <span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>
   <span class="pl-c1">3263</span> )
   <span class="pl-c1">3264</span> <span class="pl-s1">select_stmt</span> <span class="pl-c1">=</span> <span class="pl-s1">compile_state</span>.<span class="pl-s1">statement</span>
   <span class="pl-c1">3266</span> <span class="pl-s1">toplevel</span> <span class="pl-c1">=</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">stack</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">510</span>, <span class="pl-c1">in</span> <span class="pl-v">CompileState</span>.<span class="pl-en">create_for_statement</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
    <span class="pl-c1">508</span>     <span class="pl-s1">return</span> <span class="pl-en">cls</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
    <span class="pl-c1">509</span> <span class="pl-k">else</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">510</span>     <span class="pl-s1">return</span> <span class="pl-s1">klass</span>.<span class="pl-en">create_for_statement</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">696</span>, <span class="pl-c1">in</span> <span class="pl-v">ORMSelectCompileState</span>.<span class="pl-s1">create_for_statement</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>)
    <span class="pl-c1">683</span> <span class="pl-k">if</span> <span class="pl-s1">select_statement</span>.<span class="pl-s1">_memoized_select_entities</span>:
    <span class="pl-c1">684</span>     <span class="pl-s1">self</span>.<span class="pl-s1">_memoized_entities</span> <span class="pl-c1">=</span> {
    <span class="pl-c1">685</span>         <span class="pl-s1">memoized_entities</span>: <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>(
    <span class="pl-c1">686</span>             <span class="pl-s1">self</span>,
   (...)
    <span class="pl-c1">693</span>         )
    <span class="pl-c1">694</span>     }
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">696</span> <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>(
    <span class="pl-c1">697</span>     <span class="pl-s1">self</span>,
    <span class="pl-c1">698</span>     <span class="pl-s1">select_statement</span>.<span class="pl-s1">_raw_columns</span>,
    <span class="pl-c1">699</span>     <span class="pl-s1">self</span>.<span class="pl-s1">_entities</span>,
    <span class="pl-c1">700</span>     <span class="pl-s1">is_current_entities</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
    <span class="pl-c1">701</span> )
    <span class="pl-c1">703</span> <span class="pl-s1">self</span>.<span class="pl-s1">current_path</span> <span class="pl-c1">=</span> <span class="pl-s1">select_statement</span>.<span class="pl-s1">_compile_options</span>.<span class="pl-s1">_current_path</span>
    <span class="pl-c1">705</span> <span class="pl-s1">self</span>.<span class="pl-s1">eager_order_by</span> <span class="pl-c1">=</span> ()

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2432</span>, <span class="pl-c1">in</span> <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">compile_state</span>, <span class="pl-s1">entities</span>, <span class="pl-s1">entities_collection</span>, <span class="pl-s1">is_current_entities</span>)
   <span class="pl-c1">2430</span> <span class="pl-k">if</span> <span class="pl-s1">entity</span>.<span class="pl-s1">is_selectable</span>:
   <span class="pl-c1">2431</span>     <span class="pl-k">if</span> <span class="pl-s">"parententity"</span> <span class="pl-c1">in</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_annotations</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">2432</span>         <span class="pl-en">_MapperEntity</span>(
   <span class="pl-c1">2433</span>             <span class="pl-s1">compile_state</span>,
   <span class="pl-c1">2434</span>             <span class="pl-s1">entity</span>,
   <span class="pl-c1">2435</span>             <span class="pl-s1">entities_collection</span>,
   <span class="pl-c1">2436</span>             <span class="pl-s1">is_current_entities</span>,
   <span class="pl-c1">2437</span>         )
   <span class="pl-c1">2438</span>     <span class="pl-k">else</span>:
   <span class="pl-c1">2439</span>         <span class="pl-s1">_ColumnEntity</span>.<span class="pl-en">_for_columns</span>(
   <span class="pl-c1">2440</span>             <span class="pl-s1">compile_state</span>,
   <span class="pl-c1">2441</span>             <span class="pl-s1">entity</span>.<span class="pl-s1">_select_iterable</span>,
   <span class="pl-c1">2442</span>             <span class="pl-s1">entities_collection</span>,
   <span class="pl-c1">2443</span>             <span class="pl-s1">idx</span>,
   <span class="pl-c1">2444</span>         )

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2496</span>, <span class="pl-c1">in</span> <span class="pl-s1">_MapperEntity</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">compile_state</span>, <span class="pl-s1">entity</span>, <span class="pl-s1">entities_collection</span>, <span class="pl-s1">is_current_entities</span>)
   <span class="pl-c1">2493</span>     <span class="pl-s1">compile_state</span>.<span class="pl-s1">_has_orm_entities</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
   <span class="pl-c1">2495</span> <span class="pl-s1">entity</span> <span class="pl-c1">=</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_annotations</span>[<span class="pl-s">"parententity"</span>]
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2496</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_post_inspect</span>
   <span class="pl-c1">2497</span> <span class="pl-s1">ext_info</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">entity_zero</span> <span class="pl-c1">=</span> <span class="pl-s1">entity</span>
   <span class="pl-c1">2498</span> <span class="pl-s1">entity</span> <span class="pl-c1">=</span> <span class="pl-s1">ext_info</span>.<span class="pl-s1">entity</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\l<span class="pl-s1">anghelpers</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1180</span>, <span class="pl-c1">in</span> <span class="pl-v">HasMemoized</span>.<span class="pl-s1">memoized_attribute</span>.<span class="pl-en">__get__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-s1">cls</span>)
   <span class="pl-c1">1178</span> <span class="pl-k">if</span> <span class="pl-s1">obj</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
   <span class="pl-c1">1179</span>     <span class="pl-s1">return</span> <span class="pl-s1">self</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1180</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fget</span>(<span class="pl-s1">obj</span>)
   <span class="pl-c1">1181</span> <span class="pl-s1">obj</span>.<span class="pl-s1">_memoized_keys</span> |= {<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>}
   <span class="pl-c1">1182</span> <span class="pl-k">return</span> <span class="pl-s1">result</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2123</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_post_inspect</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">2112</span> @<span class="pl-v">HasMemoized</span>.<span class="pl-en">memoized_attribute</span>
   <span class="pl-c1">2113</span> <span class="pl-k">def</span> <span class="pl-s1">_post_inspect</span>(<span class="pl-s1">self</span>):
   <span class="pl-c1">2114</span>     <span class="pl-s">"""This hook is invoked by attribute inspection.</span>
<span class="pl-s">   2115 </span>
<span class="pl-s">   2116     E.g. when Query calls:</span>
<span class="pl-s">   (...)</span>
<span class="pl-s">   2121 </span>
<span class="pl-s">   2122     """</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2123</span>     <span class="pl-s1">self</span>.<span class="pl-en">_check_configure</span>()

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1900</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_check_configure</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">1898</span> <span class="pl-k">def</span> <span class="pl-en">_check_configure</span>(<span class="pl-s1">self</span>):
   <span class="pl-c1">1899</span>     <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">registry</span>.<span class="pl-s1">_new_mappers</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">1900</span>         <span class="pl-en">_configure_registries</span>({<span class="pl-s1">self</span>.<span class="pl-s1">registry</span>}, <span class="pl-s1">cascade</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3418</span>, <span class="pl-c1">in</span> <span class="pl-en">_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>)
   <span class="pl-c1">3412</span>     <span class="pl-v">Mapper</span>.<span class="pl-s1">dispatch</span>.<span class="pl-en">_for_class</span>(<span class="pl-v">Mapper</span>).<span class="pl-en">before_configured</span>()
   <span class="pl-c1">3413</span>     <span class="pl-c"># initialize properties on all mappers</span>
   <span class="pl-c1">3414</span>     <span class="pl-c"># note that _mapper_registry is unordered, which</span>
   <span class="pl-c1">3415</span>     <span class="pl-c"># may randomly conceal/reveal issues related to</span>
   <span class="pl-c1">3416</span>     <span class="pl-c"># the order of mapper compilation</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3418</span>     <span class="pl-en">_do_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>)
   <span class="pl-c1">3419</span> <span class="pl-k">finally</span>:
   <span class="pl-c1">3420</span>     <span class="pl-s1">_already_compiling</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3457</span>, <span class="pl-c1">in</span> <span class="pl-en">_do_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>)
   <span class="pl-c1">3455</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">mapper</span>.<span class="pl-s1">configured</span>:
   <span class="pl-c1">3456</span>     <span class="pl-s1">try</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">3457</span>         <span class="pl-s1">mapper</span>.<span class="pl-en">_post_configure_properties</span>()
   <span class="pl-c1">3458</span>         <span class="pl-s1">mapper</span>.<span class="pl-en">_expire_memoizations</span>()
   <span class="pl-c1">3459</span>         <span class="pl-s1">mapper</span>.<span class="pl-s1">dispatch</span>.<span class="pl-en">mapper_configured</span>(<span class="pl-s1">mapper</span>, <span class="pl-s1">mapper</span>.<span class="pl-s1">class_</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1917</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_post_configure_properties</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">1914</span> <span class="pl-s1">self</span>.<span class="pl-en">_log</span>(<span class="pl-s">"initialize prop %s"</span>, <span class="pl-s1">key</span>)
   <span class="pl-c1">1916</span> <span class="pl-k">if</span> <span class="pl-s1">prop</span>.<span class="pl-s1">parent</span> <span class="pl-c1">is</span> <span class="pl-s1">self</span> <span class="pl-c1">and</span> <span class="pl-c1">not</span> <span class="pl-s1">prop</span>.<span class="pl-s1">_configure_started</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">1917</span>     <span class="pl-s1">prop</span>.<span class="pl-en">init</span>()
   <span class="pl-c1">1919</span> <span class="pl-k">if</span> <span class="pl-s1">prop</span>.<span class="pl-s1">_configure_finished</span>:
   <span class="pl-c1">1920</span>     <span class="pl-s1">prop</span>.<span class="pl-en">post_instrument_class</span>(<span class="pl-s1">self</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\i<span class="pl-s1">nterfaces</span>.<span class="pl-s1">py</span>:<span class="pl-c1">231</span>, <span class="pl-c1">in</span> <span class="pl-v">MapperProperty</span>.<span class="pl-en">init</span>(<span class="pl-s1">self</span>)
    <span class="pl-c1">224</span> <span class="pl-s">"""Called after all mappers are created to assemble</span>
<span class="pl-s">    225 relationships between mappers and perform other post-mapper-creation</span>
<span class="pl-s">    226 initialization steps.</span>
<span class="pl-s">    227 </span>
<span class="pl-s">    228 </span>
<span class="pl-s">    229 """</span>
    <span class="pl-c1">230</span> <span class="pl-s1">self</span>.<span class="pl-s1">_configure_started</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">231</span> <span class="pl-s1">self</span>.<span class="pl-en">do_init</span>()
    <span class="pl-c1">232</span> <span class="pl-s1">self</span>.<span class="pl-s1">_configure_finished</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2150</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">do_init</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">2148</span> <span class="pl-s1">def</span> <span class="pl-en">do_init</span>(<span class="pl-s1">self</span>):
   <span class="pl-c1">2149</span>     <span class="pl-s1">self</span>.<span class="pl-en">_check_conflicts</span>()
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2150</span>     <span class="pl-s1">self</span>.<span class="pl-en">_process_dependent_arguments</span>()
   <span class="pl-c1">2151</span>     <span class="pl-s1">self</span>.<span class="pl-en">_setup_registry_dependencies</span>()
   <span class="pl-c1">2152</span>     <span class="pl-s1">self</span>.<span class="pl-en">_setup_join_conditions</span>()

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2245</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">_process_dependent_arguments</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">2231</span> <span class="pl-s1">self</span>.<span class="pl-s1">_user_defined_foreign_keys</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-en">column_set</span>(
   <span class="pl-c1">2232</span>     <span class="pl-s1">coercions</span>.<span class="pl-en">expect</span>(
   <span class="pl-c1">2233</span>         <span class="pl-s1">roles</span>.<span class="pl-v">ColumnArgumentRole</span>, <span class="pl-s1">x</span>, <span class="pl-s1">argname</span><span class="pl-c1">=</span><span class="pl-s">"foreign_keys"</span>
   <span class="pl-c1">2234</span>     )
   <span class="pl-c1">2235</span>     <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">util</span>.<span class="pl-en">to_column_set</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_user_defined_foreign_keys</span>)
   <span class="pl-c1">2236</span> )
   <span class="pl-c1">2238</span> <span class="pl-s1">self</span>.<span class="pl-s1">remote_side</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-en">column_set</span>(
   <span class="pl-c1">2239</span>     <span class="pl-s1">coercions</span>.<span class="pl-en">expect</span>(
   <span class="pl-c1">2240</span>         <span class="pl-s1">roles</span>.<span class="pl-v">ColumnArgumentRole</span>, <span class="pl-s1">x</span>, <span class="pl-s1">argname</span><span class="pl-c1">=</span><span class="pl-s">"remote_side"</span>
   <span class="pl-c1">2241</span>     )
   <span class="pl-c1">2242</span>     <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">util</span>.<span class="pl-en">to_column_set</span>(<span class="pl-s1">self</span>.<span class="pl-s1">remote_side</span>)
   <span class="pl-c1">2243</span> )
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2245</span> <span class="pl-s1">self</span>.<span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">entity</span>.<span class="pl-s1">persist_selectable</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\l<span class="pl-s1">anghelpers</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1113</span>, <span class="pl-c1">in</span> <span class="pl-s1">memoized_property</span>.<span class="pl-en">__get__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-s1">cls</span>)
   <span class="pl-c1">1111</span> <span class="pl-k">if</span> <span class="pl-s1">obj</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
   <span class="pl-c1">1112</span>     <span class="pl-s1">return</span> <span class="pl-s1">self</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1113</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fget</span>(<span class="pl-s1">obj</span>)
   <span class="pl-c1">1114</span> <span class="pl-k">return</span> <span class="pl-s1">result</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2112</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">entity</span>(<span class="pl-s1">self</span>)
   <span class="pl-c1">2109</span> <span class="pl-s1">mapperlib</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-s1">preloaded</span>.<span class="pl-s1">orm_mapper</span>
   <span class="pl-c1">2111</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>, <span class="pl-s1">util</span>.<span class="pl-s1">string_types</span>):
<span class="pl-c1">-&gt;</span> <span class="pl-c1">2112</span>     <span class="pl-s1">argument</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_clsregistry_resolve_name</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>)()
   <span class="pl-c1">2114</span> <span class="pl-s1">elif</span> <span class="pl-en">callable</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>) <span class="pl-c1">and</span> <span class="pl-c1">not</span> <span class="pl-en">isinstance</span>(
   <span class="pl-c1">2115</span>     <span class="pl-s1">self</span>.<span class="pl-s1">argument</span>, (<span class="pl-s1">type</span>, <span class="pl-s1">mapperlib</span>.<span class="pl-v">Mapper</span>)
   <span class="pl-c1">2116</span> ):
   <span class="pl-c1">2117</span>     <span class="pl-s1">argument</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">argument</span>()

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">393</span>, <span class="pl-c1">in</span> <span class="pl-s1">_class_resolver</span>.<span class="pl-en">_resolve_name</span>(<span class="pl-s1">self</span>)
    <span class="pl-c1">391</span> <span class="pl-s1">for</span> <span class="pl-s1">token</span> <span class="pl-c1">in</span> <span class="pl-s1">name</span>.<span class="pl-en">split</span>(<span class="pl-s">"."</span>):
    <span class="pl-c1">392</span>     <span class="pl-k">if</span> <span class="pl-s1">rval</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">393</span>         <span class="pl-s1">rval</span> <span class="pl-c1">=</span> <span class="pl-s1">d</span>[<span class="pl-s1">token</span>]
    <span class="pl-c1">394</span>     <span class="pl-k">else</span>:
    <span class="pl-c1">395</span>         <span class="pl-s1">rval</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">rval</span>, <span class="pl-s1">token</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\_<span class="pl-s1">collections</span>.<span class="pl-s1">py</span>:<span class="pl-c1">746</span>, <span class="pl-c1">in</span> <span class="pl-v">PopulateDict</span>.<span class="pl-en">__missing__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
    <span class="pl-c1">745</span> <span class="pl-k">def</span> <span class="pl-en">__missing__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">746</span>     <span class="pl-s1">self</span>[<span class="pl-s1">key</span>] <span class="pl-c1">=</span> <span class="pl-s1">val</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">creator</span>(<span class="pl-s1">key</span>)
    <span class="pl-c1">747</span>     <span class="pl-s1">return</span> <span class="pl-s1">val</span>

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">352</span>, <span class="pl-c1">in</span> <span class="pl-s1">_class_resolver</span>.<span class="pl-en">_access_cls</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
    <span class="pl-c1">349</span>         <span class="pl-k">return</span> <span class="pl-en">_GetTable</span>(<span class="pl-s1">key</span>, <span class="pl-s1">cls</span>.<span class="pl-s1">metadata</span>)
    <span class="pl-c1">351</span> <span class="pl-k">if</span> <span class="pl-s1">key</span> <span class="pl-c1">in</span> <span class="pl-s1">decl_class_registry</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">352</span>     <span class="pl-s1">return</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">decl_class_registry</span>[<span class="pl-s1">key</span>])
    <span class="pl-c1">354</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">favor_tables</span>:
    <span class="pl-c1">355</span>     <span class="pl-k">if</span> <span class="pl-s1">key</span> <span class="pl-c1">in</span> <span class="pl-s1">metadata</span>.<span class="pl-s1">tables</span>:

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">313</span>, <span class="pl-c1">in</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">value</span>)
    <span class="pl-c1">311</span> <span class="pl-s1">def</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">value</span>):
    <span class="pl-c1">312</span>     <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">value</span>, <span class="pl-s1">_MultipleClassMarker</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">313</span>         <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span>.<span class="pl-en">attempt_get</span>([], <span class="pl-s1">key</span>)
    <span class="pl-c1">314</span>     <span class="pl-s1">return</span> <span class="pl-en">_GetColumns</span>(<span class="pl-s1">value</span>)

<span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">144</span>, <span class="pl-c1">in</span> <span class="pl-s1">_MultipleClassMarker</span>.<span class="pl-en">attempt_get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">path</span>, <span class="pl-s1">key</span>)
    <span class="pl-c1">142</span> <span class="pl-k">def</span> <span class="pl-en">attempt_get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">path</span>, <span class="pl-s1">key</span>):
    <span class="pl-c1">143</span>     <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">self</span>.<span class="pl-s1">contents</span>) <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">144</span>         <span class="pl-s1">raise</span> <span class="pl-s1">exc</span>.<span class="pl-v">InvalidRequestError</span>(
    <span class="pl-c1">145</span>             <span class="pl-s">'Multiple classes found for path "%s" '</span>
    <span class="pl-c1">146</span>             <span class="pl-s">"in the registry of this declarative "</span>
    <span class="pl-c1">147</span>             <span class="pl-s">"base. Please use a fully module-qualified path."</span>
    <span class="pl-c1">148</span>             <span class="pl-c1">%</span> (<span class="pl-s">"."</span>.<span class="pl-en">join</span>(<span class="pl-s1">path</span> <span class="pl-c1">+</span> [<span class="pl-s1">key</span>]))
    <span class="pl-c1">149</span>         )
    <span class="pl-c1">150</span>     <span class="pl-k">else</span>:
    <span class="pl-c1">151</span>         <span class="pl-s1">ref</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">self</span>.<span class="pl-s1">contents</span>)[<span class="pl-c1">0</span>]

<span class="pl-v">InvalidRequestError</span>: <span class="pl-v">Multiple</span> <span class="pl-s1">classes</span> <span class="pl-s1">found</span> <span class="pl-s1">for</span> <span class="pl-s1">path</span> <span class="pl-s">"Address"</span> <span class="pl-c1">in</span> <span class="pl-s1">the</span> <span class="pl-s1">registry</span> <span class="pl-s1">of</span> <span class="pl-s1">this</span> <span class="pl-s1">declarative</span> <span class="pl-s1">base</span>. <span class="pl-v">Please</span> <span class="pl-s1">use</span> <span class="pl-s1">a</span> <span class="pl-s1">fully</span> <span class="pl-s1">module</span><span class="pl-c1">-</span><span class="pl-s1">qualified</span> <span class="pl-s1">path</span>.</pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS: Windows 11</li>
<li>Python: 3.10.4</li>
<li>SQLAlchemy:  1.4.32</li>
<li>Database: sqlite3 (memory)</li>
<li>DBAPI (eg: psycopg, cx_oracle, mysqlclient): pysqlite</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>