For now I have an unoptimized solution working. I don't ever keep a
reference to the SQLA instance and in the reconstructor I reattach the
ephemeral state. Something like.
class User(db.Model):
__data_cache = dict()
@orm.reconstructor
def init_on_load(self):
data =
Thanks for the thoughts. I'm going to digest, read docs, and experiment.
On Wed, Feb 12, 2020 at 8:52 AM Mike Bayer wrote:
>
>
> On Tue, Feb 11, 2020, at 11:41 PM, Rob Rosenfeld wrote:
>
> Hi All,
>
> I am using Flask-SQLAlchemy on a legacy database. My SQLA classes /
> tables are setup
Hi All,
I am using Flask-SQLAlchemy on a legacy database. My SQLA classes / tables
are setup using declarative base and autoload. In addition to using the
class to access persisted data, I also use plain old Python to enrich them
with ephemeral data.
Every time I load a User object, I'd