s = select([func.coalesce(func.avg(product_flavor_t.c.size), 0).label('f1'),
func.count(product_flavor_t.c.id).label('f2')]).\
select_from(product_t.outerjoin(product_flavor_t))
op.execute(product_t.update().values(servings=s.c.f1, flavors_count=s.c.f2))
I tried that, but it
On Thu, Feb 25, 2016 at 1:19 PM, sector119 wrote:
> Hello,
>
> Can some one help me with that query? I get AttributeError: servings
> I expect that sqlalchemy use update from select for that query or it's not
> possible and I must use select(...).as_scalar() for every
Hello,
Can some one help me with that query? I get AttributeError: servings
I expect that sqlalchemy use update from select for that query or it's not
possible and I must use select(...).as_scalar() for every updated column?
s =