[sqlalchemy] SQLAlchemy quoting of table names - Can't redefine 'quote' or 'quote_schema' arguments

2015-05-27 Thread Adam Darwin
Whilst upgrading from sqlalchemy 0.8 to 1.0.4 my ORM has broken with the error Can't redefine 'quote' or 'quote_schema' arguments I connect to a sybase db, and use a declarative_base Base = declarative_base() Using a standard method to create the mapping below class RiskAggregationGroup(Bas

Re: [sqlalchemy] difference between expunge() and make_transient()

2015-05-27 Thread Mike Bayer
On 5/27/15 5:00 PM, c.bu...@posteo.jp wrote: On 2015-05-26 13:06 Mike Bayer wrote: expunge sends a "persistent" object to the "detached" state. make_transient converts a "persistent" object to a "transient". These states are described at When I expunge() an object (it became "detached") and

Re: [sqlalchemy] difference between expunge() and make_transient()

2015-05-27 Thread c.buhtz
On 2015-05-26 13:06 Mike Bayer wrote: > expunge sends a "persistent" object to the "detached" state. > make_transient converts a "persistent" object to a "transient". These > states are described at When I expunge() an object (it became "detached") and after that modifying its values (maybe th

Re: [sqlalchemy] Join on subquery

2015-05-27 Thread Nathan
Thanks Michael, I really appreciate your help. On Wednesday, 27 May 2015 14:32:48 UTC+1, Michael Bayer wrote: > > > > On 5/27/15 2:43 AM, Nathan wrote: > > Hi, > > I'm trying to convert the following query to sqlalchemy: > > SELECT cg.id, cg.name cg.status, history.action, history.times

Re: [sqlalchemy] Join on subquery

2015-05-27 Thread Mike Bayer
On 5/27/15 2:43 AM, Nathan wrote: Hi, I'm trying to convert the following query to sqlalchemy: | SELECT cg.id,cg.namecg.status,history.action,history.timestampFROM customergame cgJOIN history ON history.id=(SELECT idFROM history h WHERE cg.id=h.customergame_idORDER BY timestamp DESC LIMIT 1

[sqlalchemy] Re: relationship(with lazy="dynamic) different behavior on session.delete() btw. SA 0.9.3 and SA 1.0.4

2015-05-27 Thread g
Hi I found the answer I was loking for in http://docs.sqlalchemy.org/en/rel_1_0/orm/cascades.html#delete The other, more special case way is to set the passive_deletes flag to

[sqlalchemy] Re: relationship(with lazy="dynamic) different behavior on session.delete() btw. SA 0.9.3 and SA 1.0.4

2015-05-27 Thread g
Hi Thanks for your answer ! I understood that : "The default behavior of relationship when an object is deleted that is referred to via another one with a foreign key is to set it to NULL" But if I use the DBMS to delete the parent (*delete from node where id = 1)* I have. *ERROR: update o