[sqlalchemy] Re: Aggregate function of connected items as a property?

2007-09-10 Thread sdobrev
My problem is: I want to be able to select from Thread, ordering it by descending order of the maximum tn_ctime for each thread, to find the most recently referenced threads. Which is to say, I want to do something like select t.*, coalesce(c.most_recent_child, t.tn_ctime) as

[sqlalchemy] _state and related

2007-09-10 Thread svilen
before v3463, _state was a property and was setup on the fly whenever used. now its being setup into the __init__-replacement of the object. Thus, with the property it was possible as side-effect to have an object instance _before_ having any sqlalchemy around, then declare/build mappers/

[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: group_by

2007-09-10 Thread Roger Demetrescu
On 9/8/07, Lukasz Szybalski [EMAIL PROTECTED] wrote: On 9/7/07, Paul Johnston [EMAIL PROTECTED] wrote: Hi, And if I wanted to select a year and group by year? select User.Year from User group by User.Year db.execute(select([User.Year]) ??? Have a look at

[sqlalchemy] Re: add condition over a classmethod

2007-09-10 Thread svilen
somethings' missing here.. whats the link classmethod - select - etc? do explain again/more... u mean the classmethod generates the filter-expression? whats the difference classmethod vs plainmethod here? all the same, just call it: self.myclassmethod(..) On Monday 10 September 2007 14:40:57

[sqlalchemy] Re: Changeset 2642's fix is in the wrong place [firebird]

2007-09-10 Thread Roger Demetrescu
Michael, On 9/10/07, Michael Bayer [EMAIL PROTECTED] wrote: hey Roger - can you reopen ticket #570 and attach your patch there ? FTR, the 0.4 codebase does this differently and is probably correct over there (but also, not tested since I dont have FB). I'll do that tonight... and will

[sqlalchemy] Re: backref relation is None instead of list?

2007-09-10 Thread Dan Eloff
On 9/9/07, Michael Bayer [EMAIL PROTECTED] wrote: I cant reproduce this, although the error to me seems like you are actually saying c._parent = [] (some list object). If thats not it, send along a reproducing test script. I tried to recreate it in the shell and failed. I then loaded my

[sqlalchemy] Re: Changeset 2642's fix is in the wrong place [firebird] [PATCHES]

2007-09-10 Thread Roger Demetrescu
Michael On 9/10/07, Michael Bayer [EMAIL PROTECTED] wrote: hey Roger - can you reopen ticket #570 and attach your patch there ? FTR, the 0.4 codebase does this differently and is probably correct over there (but also, not tested since I dont have FB). I guess you meant #370.. :) Well,