Re: [sqlalchemy] Core insert and named columns

2021-10-21 Thread Tomas Pavlovsky
Ok, thank you. środa, 20 października 2021 o 19:05:46 UTC+2 Mike Bayer napisał(a): > https://github.com/sqlalchemy/sqlalchemy/issues/7217 > > On Wed, Oct 20, 2021, at 1:01 PM, Mike Bayer wrote: > > for the moment yes, because there is no ORM overlay for the insert() > construct.the case

Re: [sqlalchemy] Core insert and named columns

2021-10-20 Thread Mike Bayer
https://github.com/sqlalchemy/sqlalchemy/issues/7217 On Wed, Oct 20, 2021, at 1:01 PM, Mike Bayer wrote: > for the moment yes, because there is no ORM overlay for the insert() > construct.the case below should be improved however. > > reliable way is to use the attributes: > > stmt =

Re: [sqlalchemy] Core insert and named columns

2021-10-20 Thread Mike Bayer
for the moment yes, because there is no ORM overlay for the insert() construct. the case below should be improved however. reliable way is to use the attributes: stmt = insert(A).values({A.id: 1, A.field: 3}) On Wed, Oct 20, 2021, at 6:31 AM, Tomas Pavlovsky wrote: > Hi, > > class A():

[sqlalchemy] Core insert and named columns

2021-10-20 Thread Tomas Pavlovsky
Hi, class A(): id = Column('object_id", Integer, primary_key=True) field = Column(Integer, primary_key=True) insert(A).values(**{id:1, field:3}) sqlalchemy.exc.CompileError: Unconsumed column names: id It is normal behavior or not? Thanks -- SQLAlchemy - The Python SQL Toolkit and Object