[sqlalchemy] Re: retrieving columns from secondary in n:m relation

2007-05-16 Thread Glauco
I think is not possible... :-( The association object pattern describe because But for this and other cases i've a proposal: The add_column function must add only column in the Result, and oly add_entity must add tables to from clause, in this manner people who use this feature can do

[sqlalchemy] unsave instance on a cascade='all, delete-orphans'

2007-05-16 Thread Glauco
in a mapper where i've a 1:n relation i've some problem with Tubo Gears in delete, after the cascade=delete-orphan, all options, all times i add a new instance of child this error occours: instance Acl None is an unsaved, pending instance and is an orphan (is not attached to any parent

[sqlalchemy] Re: winpdb and sqlalchemy

2007-05-16 Thread Marco Mariani
Edin Salkovic ha scritto: Currently, SQLAlchemy's setup(...) hasn't set this arg, meaning that setuptools uses its own algorithm to determine if SQLAlchemy can be installed as a zipped egg. You can switch off zip for all newly installed eggs, in ~/.pydistutils.cfg [easy_install] zip_ok

[sqlalchemy] Re: SQL newbie question: How to select the last message for each user

2007-05-16 Thread Glauco
are you searhing for ? select max( changeTime ) from OrderDiscount group by orderID ; ? i don't understand well what you are searching for Glauco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] cascade='all, delete-orphan' causing error about unsaved, pending instances

2007-05-16 Thread Andreas Jung
I am building a media database using SA where the model basically maps Medium --1:N-- Versions --1:N-- Files My code for creating new Medium instances based on an import script basically is doing the following: f = File(...) v = Version() v.files.append(f) m = Medium()

[sqlalchemy] Re: unsave instance on a cascade='all, delete-orphans'

2007-05-16 Thread Michael Bayer
new to the FAQ: http://www.sqlalchemy.org/trac/wiki/ FAQ#FlushError:instancesomeinstanceisanunsavedpendinginstanceandisanorph an On May 16, 2007, at 3:44 AM, Glauco wrote: in a mapper where i've a 1:n relation i've some problem with Tubo Gears in delete, after the cascade=delete-orphan,

[sqlalchemy] Re: SQL newbie question: How to select the last message for each user

2007-05-16 Thread Noam Raphael
On 16/05/07, Glauco [EMAIL PROTECTED] wrote: are you searhing for ? select max( changeTime ) from OrderDiscount group by orderID ; ? i don't understand well what you are searching for Thanks to all of you! I actually needed the last message itself - more than just its date. Thanks to

[sqlalchemy] Problem with using global metadata/connection in a threaded context

2007-05-16 Thread David Anderson
Hi, I'm using SQLAlchemy in an application where I have multiple threads needing to talk to a database. I am using only the direct SQL contruction and querying API, none of the ORM stuff. Currently, I create a single instance of my persistence layer API, which makes a call to global_connect(),