DATA
nyc = City(name=New York City)
michael_bayer = Bowler(name=Michael Bayer, highscore=299, city=nyc)
big_lebowski = Bowler(name=Jeffrey Lebowsky, highscore=170,
city=nyc)
cle = City(name=Cleveland)
ian_charnas = Bowler(name=Ian Charnas, highscore=220, city=cle)
the_jesus = Bowler(name=Antonio
Bayer [EMAIL PROTECTED] wrote:
On Nov 10, 2008, at 5:35 AM, Ian Charnas wrote:
Hello Alchemy Land!
If I have a simple test-case with Bowler objects and City objects, and
I want to use func.max and group_by in order to find the highest
scorers in each city... I might do something like
')
and then use default=now in your table definition.
-Ian Charnas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group
http://www.sqlalchemy.org/trac/ticket/614
basically this line:
self.orig_set = []
needs to be this line:
self.orig_set = util.Set()
or certain selects will throw an error saying list type has no
attribute 'add'
I couldn't find a sqlalchemy-tickets list, so I thought I'd post here.
-Ian
? I was hoping there would be something
like Animal.select.mapper or Animal.select._sqlalchemy that I
could use to differentiate which methods were added by the mapper and
which were there originally, but I can't seem to find any such thing.
many thanks in advance,
-Ian Charnas from the Pagoda CMS
query, you can do this:
from sqlalchemy import *
engine = create_engine(sqlite:///test.db)
engine.execute(insert into people(first_name, last_name)
values('ian', 'charnas'))
engine.execute(select * from people).fetchall()
[(1, 'ian', 'charnas')]
note that metadata keeps track of tables, and session