send viewonly=True to these relationships you make. these are not for writing
anyway and that will resolve the overlaps warnings (the warning says as much).
On Thu, Sep 7, 2023, at 10:41 AM, zedr...@gmail.com wrote:
> Hi Mike,
>
> Thanks a lot for taking the time to reply…
>
> Indeed, I came
Hi Mike,
Thanks a lot for taking the time to reply…
Indeed, I came to a similar conclusion and worked out what seems like a
fairly clean way to copy relationships (assuming they do not use
secondary_join).
The fact that I cannot seem to update the mapper before the class is
created makes my
On Thu, Sep 7, 2023, at 4:39 AM, zedr...@gmail.com wrote:
>
> *Is there a clean way to (programmatically) duplicate all relationship from
> an existing model, over to a new model (that targets the same table and
> selects a subset of columns as a subquery)?*
relatonships are fixed to their
I am trying to (programmatically) create partial views of existing
SQLAlchemy models, using a metaclass.
A streamlined example, trying to get a subquery view on a model Foo with a
relationship bar, would look something like that:
class Bar(db.Model):
id = db.Column(db.Integer,