[sqlalchemy] Re: History meta and unique issue

2011-10-18 Thread Damian
Hi Mike, Brilliant thanks - that works - spent ages staring at it and missed the second col.copy()! Damian On Oct 17, 6:27 pm, Michael Bayer mike...@zzzcomputing.com wrote: ah the example has a bug, you're hitting a second part of the code there where it fetches columns that are placed on a

[sqlalchemy] Deletion

2011-10-18 Thread fribes
Hi all, Despite some doc and web digging, I didn't find how to tell sqa to behave the way I want : on deletion on Peripheral, also delete in Actuator. with the following code, the record in Actuator remains after a deletion, and a subsequent creation fails with IntegrityError. class

[sqlalchemy] Cant understand behavior of sqlalchemy while adding same object twice in a session

2011-10-18 Thread Manav Goel
Hello, I am working in eclipse IDE. I have this code in the file : class User(Base): __tablename__ = 'users' id = Column('user_id',Integer,primary_key = True) name =

Re: [sqlalchemy] Deletion

2011-10-18 Thread Mike Conley
How are you doing the delete? This should delete both. a = sess.query(Peripheral).filter(Peripheral.label=='some label').one() sess.delete(a) sess.commit() This will not work. a = sess.query(Peripheral).filter(Peripheral.label=='some label').delete() I think the explanation

[sqlalchemy] Using collation sequence in SqlAlchemy against Sqlite DB

2011-10-18 Thread Roja Sen
Could someone help me to set different collation in sqlAlchemy against Sqlite DB? I tried to execute something like SELECT icu_load_collation('pl_PL', 'POLISH') when getting a connection but couldn't reference the collation sequence when creating the table object, I keep getting the following

Re: [sqlalchemy] Deletion

2011-10-18 Thread Michael Bayer
On Oct 18, 2011, at 10:03 AM, fribes wrote: Hi all, Despite some doc and web digging, I didn't find how to tell sqa to behave the way I want : on deletion on Peripheral, also delete in Actuator. with the following code, the record in Actuator remains after a deletion, and a

Re: [sqlalchemy] Cant understand behavior of sqlalchemy while adding same object twice in a session

2011-10-18 Thread Michael Bayer
On Oct 18, 2011, at 1:21 PM, Manav Goel wrote: Hello, I am working in eclipse IDE. I have this code in the file : class User(Base): __tablename__ = 'users' id =

Re: [sqlalchemy] Using collation sequence in SqlAlchemy against Sqlite DB

2011-10-18 Thread Michael Bayer
I don't know what icu_load_collation is, but SQLite's documentation points to section 6.2, Collation Sequence Examples at http://www.sqlite.org/datatype3.html which describes how to create tables with certain collations. There is also the COLLATE operator:

[sqlalchemy] How to keep ORM Sessions in sync when using the SQL expression language as well?

2011-10-18 Thread Russ
I often mix up the SQL expression language with the use of an ORM session, and it is great that SQLAlchemy more than supports this. But... what are the recommended ways to keep the session in sync with what you do with the SQL expression stuff? For example, with the ORM you can't really do a