<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class A(Base):
    __tablename__ = 'a'
    id = Column(Integer, primary_key=True)
    a = Column(Integer)
    b = Column(Integer)

    aplusb = column_property(
        a + b, deferred=True
    )

e = create_engine(&quot;sqlite://&quot;, echo=True)
Base.metadata.create_all(e)

s = Session(e)
s.add(A(a=1, b=2))
s.commit()

a1 = s.query(A).first()
assert 'aplusb' not in a1.__dict__
a1.b = 5
s.flush()
s.commit()
a1.b
assert 'aplusb' not in a1.__dict__


"><pre class="notranslate"><code class="notranslate">from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class A(Base):
    __tablename__ = 'a'
    id = Column(Integer, primary_key=True)
    a = Column(Integer)
    b = Column(Integer)

    aplusb = column_property(
        a + b, deferred=True
    )

e = create_engine("sqlite://", echo=True)
Base.metadata.create_all(e)

s = Session(e)
s.add(A(a=1, b=2))
s.commit()

a1 = s.query(A).first()
assert 'aplusb' not in a1.__dict__
a1.b = 5
s.flush()
s.commit()
a1.b
assert 'aplusb' not in a1.__dict__



</code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">Hi,</p>
<p dir="auto">I noticed that the update() usage in /orm/extensions/sqlsoup.html is outdated:</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">db.loans.update(db.loans.book_id==2, book_id=1)</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">This doesn't work anymore.  There may be more out-of-date code in there, I haven't checked.</p>