Re: [sqlalchemy] A story of a field named object... and is it a big deal

2017-08-11 Thread Ken MacKenzie
Thank you everyone for the responses. I think it is not as big a deal as I might have been expecting,. The purist in me does not like redefining object. But from an api perspective there is not cleaner and purpose built name for the field in question. Ken -- SQLAlchemy - The Python SQL

Re: [sqlalchemy] A story of a field named object... and is it a big deal

2017-08-09 Thread Jonathan Vanasco
On Wednesday, August 9, 2017 at 7:18:03 PM UTC-4, Mike Bayer wrote: > it will work fine > expanding on Mike's response... you're just defining `object` within the scope of the class definition. # `object` is the built-in class Foo(object): object = column() #

Re: [sqlalchemy] A story of a field named object... and is it a big deal

2017-08-09 Thread Mike Bayer
On Wed, Aug 9, 2017 at 6:57 PM, Ken MacKenzie wrote: > yeah but I have it in the model as > > class gltable(Base): > ... > object = column(string(6)) it will work fine, up to you if you want to worry about it, you can always make it: object_ = column("object", string(6))

Re: [sqlalchemy] A story of a field named object... and is it a big deal

2017-08-09 Thread Ken MacKenzie
yeah but I have it in the model as class gltable(Base): ... object = column(string(6)) On Wed, Aug 9, 2017 at 6:33 PM, Mike Bayer wrote: > On Wed, Aug 9, 2017 at 2:12 PM, Ken MacKenzie > wrote: > > So I have been using SQL alchemy to convert

Re: [sqlalchemy] A story of a field named object... and is it a big deal

2017-08-09 Thread Mike Bayer
On Wed, Aug 9, 2017 at 2:12 PM, Ken MacKenzie wrote: > So I have been using SQL alchemy to convert some unidata data stores into ms > sql data. > > One of the GL components in our system is called object, well object code. > > Most refer to it as object so when I defined my

[sqlalchemy] A story of a field named object... and is it a big deal

2017-08-09 Thread Ken MacKenzie
So I have been using SQL alchemy to convert some unidata data stores into ms sql data. One of the GL components in our system is called object, well object code. Most refer to it as object so when I defined my model for the table including it I named it object. It all works fine, but object