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

2017-02-14 Thread mike bayer
On 02/14/2017 08:15 PM, Zsolt Ero wrote: I would like to change a primary key's value, to be deterministic, based on a multi-to-multi relation. Thus I'm populating the tables with a temporary ids (just random strings), then calculating the right, unique id, and changing it afterwards. the

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

2017-02-14 Thread Zsolt Ero
I would like to change a primary key's value, to be deterministic, based on a multi-to-multi relation. Thus I'm populating the tables with a temporary ids (just random strings), then calculating the right, unique id, and changing it afterwards. I have the following models: class

Re: [sqlalchemy] Unable to use the 'mock' strategy: AttributeError: 'MockConnection' object has no attribute 'run_callable'

2017-02-14 Thread mike bayer
On 02/14/2017 11:02 AM, Manuel wrote: mike bayer writes: it's sort of a bug but you're attempting to do a thing that in any case is not possible. The "mock" execution strategy does not support operations that require result sets, because it isn't actually querying

Re: [sqlalchemy] Unable to use the 'mock' strategy: AttributeError: 'MockConnection' object has no attribute 'run_callable'

2017-02-14 Thread Manuel
mike bayer writes: > it's sort of a bug but you're attempting to do a thing that in any case is not > possible. The "mock" execution strategy does not support operations that > require result sets, because it isn't actually querying a database. If we > add the

Re: [sqlalchemy] Unable to use the 'mock' strategy: AttributeError: 'MockConnection' object has no attribute 'run_callable'

2017-02-14 Thread mike bayer
On 02/14/2017 09:53 AM, Manuel Vázquez Acosta wrote: Hi, I'm assessing how to use SA within another project that uses psycopg2 and maintains it's connection pool and the like. I have the following code: @property def table(self): from sqlalchemy import create_engine

[sqlalchemy] Unable to use the 'mock' strategy: AttributeError: 'MockConnection' object has no attribute 'run_callable'

2017-02-14 Thread Manuel Vázquez Acosta
Hi, I'm assessing how to use SA within another project that uses psycopg2 and maintains it's connection pool and the like. I have the following code: @property def table(self): from sqlalchemy import create_engine from sqlalchemy.schema import Table table =