Re: [sqlalchemy] Re: ArgumentError: Only one Column may be marked autoincrement=True, found both id and id.` when I run the following insert

2020-08-22 Thread Richard Damon
On 8/22/20 12:09 PM, Vitaly Kruglikov wrote: > Hi Richard. I wish it was that simple, but it's not. Here is an > example of how using a builtin name breaks: > > ``` > In [3]: unique = object() >    ...: class TestId: >    ...:     id = 'something else' >    ...:     unique_id = id(unique) >    

Re: [sqlalchemy] Re: ArgumentError: Only one Column may be marked autoincrement=True, found both id and id.` when I run the following insert

2020-08-22 Thread Vitaly Kruglikov
Hi Richard. I wish it was that simple, but it's not. Here is an example of how using a builtin name breaks: ``` In [3]: unique = object() ...: class TestId: ...: id = 'something else' ...: unique_id = id(unique) ...: ...:

Re: [sqlalchemy] Re: ArgumentError: Only one Column may be marked autoincrement=True, found both id and id.` when I run the following insert

2020-08-22 Thread Richard Damon
On 8/22/20 10:46 AM, Vitaly Kruglikov wrote: > I suspect this has something to do with the combination of the > explicit definition of the `id_` column and reflection, but don't know > how to fix. I really need to keep the explicit `id_` descriptor and > shouldn't rename it to `id` because that's

[sqlalchemy] Re: ArgumentError: Only one Column may be marked autoincrement=True, found both id and id.` when I run the following insert

2020-08-22 Thread Vitaly Kruglikov
Please note, that I posted, then deleted a message with the same subject in order to correct some relevant information, and this post replaces the one I deleted. On Saturday, August 22, 2020 at 7:43:42 AM UTC-7 Vitaly Kruglikov wrote: > Dear all, > > I am using: > sqlalchemy==1.3.18 >