groups wouldn't let me attache a file. here's the text:
diff -r 57544ce34efe gluon/dal.py
--- a/gluon/dal.py Wed Oct 12 21:53:13 2011 -0500
+++ b/gluon/dal.py Sat Oct 15 08:54:00 2011 -0700
@@ -3385,7 +3385,7 @@
(items, tablename, fields) =
self.select_raw(query,fields,attributes)
# self.db['_lastsql'] = self._select(query,fields,attributes)
rows = [
- [t=='id' and int(item.key().id()) or getattr(item, t) for t in
fields]
+ [t=='id' and (int(item.key().id()) if item.key().id() else
item.key().name()) or getattr(item, t) for t in fields]
for item in items]
colnames = ['%s.%s' % (tablename, t) for t in fields]
return self.parse(rows, colnames, False)