Re: [sqlalchemy] Column.copy() omits ForeignKeys and Constraints

2019-01-10 Thread Martin Haass
Thanks! I didn't see that line. I try to compile an example tomorrow. While working on https://github.com/sqlalchemy/alembic/pull/526 it was necessary to duplicate column object with foreign_keys Regards, Martin On Thursday, 10 January 2019 16:05:42 UTC+1, Mike Bayer wrote: > > On Thu, Jan 10, 2

Re: [sqlalchemy] How to use load_only or with_entities with relationships

2019-01-10 Thread Mike Bayer
On Thu, Jan 10, 2019 at 8:34 AM Gmoney wrote: > > Thanks for the very clear reply, that helps understand the underpinnings a > bit more. Hope you didn't take the list of errors as a complaint - just a > list of what I tried... but the error message enhancements look like a good > addition tha

Re: [sqlalchemy] Column.copy() omits ForeignKeys and Constraints

2019-01-10 Thread Mike Bayer
On Thu, Jan 10, 2019 at 8:18 AM Martin Haass wrote: > > Hi, > is it a bug or a feature? > > https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/sql/schema.py:1292 > ff. > in the constructor of class column the foreign_keys and constraints are > explicitly initialized to set() whe

Re: [sqlalchemy] How to use load_only or with_entities with relationships

2019-01-10 Thread Gmoney
Thanks for the very clear reply, that helps understand the underpinnings a bit more. Hope you didn't take the list of errors as a complaint - just a list of what I tried... but the error message enhancements look like a good addition that will help when I forget all this and repeat it a year

[sqlalchemy] Column.copy() omits ForeignKeys and Constraints

2019-01-10 Thread Martin Haass
Hi, is it a bug or a feature? https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/sql/schema.py:1292 ff. in the constructor of class column the foreign_keys and constraints are explicitly initialized to set() whereas the other properties are popped from kwargs This kind of con