Re: [sqlalchemy] How to infer the ORM model class from an update()/insert() object?

2022-03-28 Thread mkmo...@gmail.com
Hi Mike, Thanks for taking a look into it. Even if only the simple case can be taken care of in 2.0, that would be good as it would set up 2.x for completing the edge cases over time. > select(User).from_statement(insert(User).returning(User, User.my_column_property)) In my particular case,

Re: [sqlalchemy] How to infer the ORM model class from an update()/insert() object?

2022-03-28 Thread Mike Bayer
since it will be very hard to change this after 2.0 is released I will try to further attempt to get ORM objects to be returned, though this will not at first support any special features: https://github.com/sqlalchemy/sqlalchemy/issues/7865 this will allow retunring(User) to send back an

Re: [sqlalchemy] How to infer the ORM model class from an update()/insert() object?

2022-03-28 Thread Mike Bayer
On Mon, Mar 28, 2022, at 1:31 PM, mkmo...@gmail.com wrote: > Hi Mike, > > When using `column_property`, this > `select(User).from_statement(ins.returing(User))` construct will not load in > the column property. Instead the ORM will issue a second query when the > column property is accessed.

Re: [sqlalchemy] How to infer the ORM model class from an update()/insert() object?

2022-03-28 Thread mkmo...@gmail.com
Hi Mike, When using `column_property`, this `select(User).from_statement(ins.returing(User))` construct will not load in the column property. Instead the ORM will issue a second query when the column property is accessed. I am able to get it working using the following:

Re: [sqlalchemy] Looking for help with interpreting an error/debugging

2022-03-28 Thread Mike Bayer
there's probably something up with that server so you will still get errors, but at least they will be familiar looking On Mon, Mar 28, 2022, at 9:01 AM, jens.t...@gmail.com wrote: > Thank you Mike for your prompt response! I opened an issue CONPY-197 >

Re: [sqlalchemy] Looking for help with interpreting an error/debugging

2022-03-28 Thread jens.t...@gmail.com
Thank you Mike for your prompt response! I opened an issue CONPY-197 , let’s see what comes of that. I’ve used mysql+pymysql:// quite happily in the past with a MySQL db, and when we switched to MariaDB I switched the drivers. It didn’t occur to me

Re: [sqlalchemy] Looking for help with interpreting an error/debugging

2022-03-28 Thread Mike Bayer
hey there - never seen that before so it is very likely to be an issue specific to mariadbconnector, which is a much lesser-used driver. suggestions are to seek help from mariadb connector devs directly, in the interim try mysqlclient or pymysql to see if the issue resolves, or shows a better

[sqlalchemy] Looking for help with interpreting an error/debugging

2022-03-28 Thread jens.t...@gmail.com
Hello, I’m utterly stomped by this problem and I hope that the wisdom of the crowd (and the much more experienced users here) can point me into the right direction. I’ve got a single MariaDB (Ver 15.1 Distrib 10.6.5-MariaDB, for Linux (x86_64)) running natively on a