[sqlalchemy] Hyper-eager autoflush for debugging

2009-11-16 Thread Gunnlaugur Briem
Hi, a common pattern for me is to encounter a ProgrammingError or other exception on autoflush. Then the point in my code at which I made a booboo has already passed and so is not indicated by the stack trace. If the cause isn't obvious, I will go rerunning the failing test, inserting

[sqlalchemy] Elixir 0.7.1 released

2009-11-16 Thread Gaetan de Menten
I am very pleased to announce that version 0.7.1 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This release packs a few interesting new features (abstract classes and a new collection type providing explicit relative

[sqlalchemy] Primary key is must in every table.

2009-11-16 Thread Niyas
Dear All, In my application, i have a master table and a details table. In the details table containes foreign key only no primary key. I will be getting the following error while running. ArgumentError: Mapper Mapper|LpoIssueDetails|tbl_lpo_issue_details could not assemble any primary key

[sqlalchemy] UnboundExecutionError with object on session

2009-11-16 Thread Fernando Takai
Hi all! I've experiencing this problem for some time now and even after debugging, i could not find why it happens. I have a medium sized multi-thread application that manipulates SQLAlchemy objects - the objects are passed from thread to thread, so, when i load an instance i close the session.

[sqlalchemy] Re: UnboundExecutionError with object on session

2009-11-16 Thread Michael Bayer
Fernando Takai wrote: Hi all! I've experiencing this problem for some time now and even after debugging, i could not find why it happens. I have a medium sized multi-thread application that manipulates SQLAlchemy objects - the objects are passed from thread to thread, so, when i load an

[sqlalchemy] Select as

2009-11-16 Thread Tomas Zulberti
Hi. I am sort of a newbie on SQLAlchemy. Is there a way to do a query with the ORM, and doing an as on the select. For example: class Example(Base): name = Column(Unicode(512) ) query = session.query(Example.name AS foo) query.all() Thanks in advance..

[sqlalchemy] Modify the start number of a sequence after it's been created

2009-11-16 Thread Jaume Sabater
Hello everyone! I've been searching information regarding this topic but without help so far. I have a dbloader.py script that takes information from a number of CSV files and dumps it into the database. After that we execute a number of tests to check all services are working fine (returning

[sqlalchemy] Re: Select as

2009-11-16 Thread Conor
Tomas Zulberti wrote: Hi. I am sort of a newbie on SQLAlchemy. Is there a way to do a query with the ORM, and doing an as on the select. For example: class Example(Base): name = Column(Unicode(512) ) query = session.query(Example.name AS foo) query.all() Every column

[sqlalchemy] Re: Primary key is must in every table.

2009-11-16 Thread Conor
Niyas wrote: Dear All, In my application, i have a master table and a details table. In the details table containes foreign key only no primary key. I will be getting the following error while running. ArgumentError: Mapper Mapper|LpoIssueDetails|tbl_lpo_issue_details could not assemble

[sqlalchemy] Re: Hyper-eager autoflush for debugging

2009-11-16 Thread Gunnlaugur Briem
On Nov 16, 3:38 pm, Michael Bayer mike...@zzzcomputing.com wrote: id like to know what errors specifically you get which aren't fairly obvious even if they happen later on.   I'm guessing some of the dependency oriented messages like dependency rule tried to blank out primary key. Nah, the

[sqlalchemy] filtering with an association_proxy

2009-11-16 Thread scott
Is there a way to filter a query involving an association_proxy? For example, say I have a one to many relation between Pages and Tags, and an association_proxy like this to let me represent tags as a list of strings. tag_objects = orm.relation('Tag') tags = association_proxy('tag_objects',