[sqlalchemy] naming convention

2015-12-12 Thread Ofir Herzas
I want to start using the naming convention but have several questions regarding this feature: 1. Does the naming convention support Sequences? If not, what's the proper way of handling them? 2. Are Booleans going to be supported in the near future or will I have to name them

RE: [sqlalchemy] How to commit objects with circular FK references?

2015-12-12 Thread Gombas, Gabor
Alternatively, you could make the constraints deferrable, and set them to deferred mode before adding objects with circular dependencies. > -Original Message- > From: sqlalchemy@googlegroups.com > [mailto:sqlalchemy@googlegroups.com] On Behalf Of Mike Bayer > Sent: 12 December 2015 02:49

Re: [sqlalchemy] naming convention

2015-12-12 Thread Mike Bayer
On 12/12/2015 04:42 AM, Ofir Herzas wrote: > I want to start using the naming convention but have several questions > regarding this feature: > > 1. Does the naming convention support Sequences? If not, what's the > proper way of handling them? the Sequence object is a free-standing

Re: [sqlalchemy] How to commit objects with circular FK references?

2015-12-12 Thread Mike Bayer
On 12/12/2015 06:31 PM, Gerald Thibault wrote: > I ended up with the following code to preprocess the session and collect > the problematic updates into a collection, which I then issue after the > initial flush. It looks really ugly, and I'm wondering if any of this > could be more easily

Re: [sqlalchemy] How to commit objects with circular FK references?

2015-12-12 Thread Gerald Thibault
I am loading data from json files, and then creating instances via ObjClass(**data), loading them into a session, and committing. I do not see an easy way to go from having an integer foreign_key value to populating the relationship with the corresponding model in order to have post_update

Re: [sqlalchemy] How to commit objects with circular FK references?

2015-12-12 Thread Gerald Thibault
I ended up with the following code to preprocess the session and collect the problematic updates into a collection, which I then issue after the initial flush. It looks really ugly, and I'm wondering if any of this could be more easily handled via a hook somewhere in SQLA? Particularly the