Re: [sqlalchemy] possible bug when using schema_translate_map and remapping "None"

2017-02-28 Thread mike bayer
this is a bug https://bitbucket.org/zzzeek/sqlalchemy/issues/3924/schema_translate_map-is-running-on-aliases is added. On 02/28/2017 12:05 PM, Bertrand Mathieu wrote: Hi, I am using sqlalchemy 1.1.5 with python 3.5 and postgresql (9.4). I have encountered what I think is a bug, it occurs

[sqlalchemy] possible bug when using schema_translate_map and remapping "None"

2017-02-28 Thread Bertrand Mathieu
Hi, I am using sqlalchemy 1.1.5 with python 3.5 and postgresql (9.4). I have encountered what I think is a bug, it occurs when: * no schema is set in metadata or tables (schema = None) * using schema_translate_map={None: 'other_schema_name'}. It happens when joining an aliased table. Basically,

[sqlalchemy] SQLAlchemy 1.1.6 Released

2017-02-28 Thread mike bayer
SQLAlchemy release 1.1.6 is now available. Release 1.1.6 continues to provide bug fixes and some new features within the 1.1 series. As we begin to lead into the development phase for 1.2 and solidify the 1.1 series as "done", additional behavioral improvements will more likely to be

[sqlalchemy] Alembic 0.9.0 Released

2017-02-28 Thread mike bayer
Alembic release 0.9.0 is now available. This release contains a few small features and assorted bugfixes, including a few that have been long awaited including that Postgresql ARRAY now renders the inner type object with the right module under autogenerate (why that one particular issue is

Re: [sqlalchemy] lazy='dynamic' with query_class

2017-02-28 Thread mike bayer
On 02/28/2017 09:15 AM, Edu Ferreira wrote: Hello, i’ve been doing a work which i need to use a custom collection with lazy=’dynamic’, and i saw that it’s not possible, and the right way to do this is inheritance “Query”, something like this: from sqlalchemy.orm import Query |

Re: [sqlalchemy] Changing primary key's value in a multi-to-multi relation

2017-02-28 Thread Zsolt Ero
Thanks for the detailed explanation! On 28 February 2017 at 16:22, mike bayer wrote: > sorry, lost track on this one. > > On 02/15/2017 10:07 PM, Zsolt Ero wrote: >> >> I'm starting to understand it! Just a few very quick questions: >> >> 1. Is it a good strategy to

Re: [sqlalchemy] Changing primary key's value in a multi-to-multi relation

2017-02-28 Thread mike bayer
sorry, lost track on this one. On 02/15/2017 10:07 PM, Zsolt Ero wrote: I'm starting to understand it! Just a few very quick questions: 1. Is it a good strategy to always use onupdate='CASCADE', ondelete='CASCADE' for all foreign keys if the db supports it (in my case Postgres 9.5 + psycopg2)?

Re: [sqlalchemy] Changing primary key's value in a multi-to-multi relation

2017-02-28 Thread Zsolt Ero
Can anyone help with these questions? Nothing urgent, I'm just interested in understanding more about SQLAlchemy. On 16 February 2017 at 04:07, Zsolt Ero wrote: > I'm starting to understand it! Just a few very quick questions: > > 1. Is it a good strategy to always use

[sqlalchemy] lazy='dynamic' with query_class

2017-02-28 Thread Edu Ferreira
Hello, i’ve been doing a work which i need to use a custom collection with lazy=’dynamic’, and i saw that it’s not possible, and the right way to do this is inheritance “Query”, something like this: from sqlalchemy.orm import Query class MyCollection(Query): … and after: