Prior to 2089, the following worked fine:
session.query(ItemKeyword).count()
where ItemKeyword has a compound primary key that is defined in its
mapper as follows:
mapper(ItemKeyword, itemkeyword_table, primary_key =
[itemkeyword_table.c.item_uuid, itemkeyword_table.c.keyword_uuid],
properties={'keyword': relation(Keyword, lazy=False, backref='itemkeywords')})
With 2089, I get the following error:
>>>session.query(ItemKeyword).count()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "sqlalchemy/orm/query.py", line 270, in count
s = sql.select([sql.func.count(list(self.table.primary_key)[0])],
whereclause, from_obj=from_obj, **kwargs)
IndexError: list index out of range
--------------------------------------------------------------------------
Platform: error occurs on both Ubuntu Linux and Windows XP; database is sqlite.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---