Sean DiZazzo schrieb:
> Ok. Dropping down to raw sql query gets me my results, however the
> tuple returned doesn't work with my datagrid widget. Is there any way
> to coerce the tuple to a sqlobject.sresults.SelectResult object? Or
> to run the raw query so that it returns the SelectResults object?
>
> files = model.Files._connection.queryAll("""SELECT files.* FROM files
> INNER JOIN (SELECT MAX(id) AS id FROM files GROUP BY filename) ids ON
> files.id = ids.id""")
If you can cope with the overall data being processed as whole, wy don't
you convert the above list to a list of objects?
files = [model.Files.get(id) for id in files] # where files is done as above
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---