klen / peewee-aio

Async support for Peewee ORM
44 stars 7 forks source link

Do not peewee-aio support ModelCompoundSelectQuery ? #7

Closed LeeWantfly closed 1 year ago

LeeWantfly commented 1 year ago

it was failed when i joining many table and using with cte in peewee-aio. Here is my code

with self._manager.allow_sync():
                async with self._manager.connection():
                    self._nrow = await self._query.count()

TypeError: object ModelCompoundSelectQuery can't be used in 'await' expression

klen commented 1 year ago

@LeeWantfly thank you for the report fixed in the latest version