Yurii Karabas

Results 236 comments of Yurii Karabas

Hi @Riya-900, Could you please change your query to smth like this: ```py select(Author).options(selectinload(Author.books)) ```

@bnku I guess the issue is with how you load relationships. I am not sure that we need to use `group_by` to get `count`.

@Riya-900 Any updates, does this comment help you? https://github.com/uriyyo/fastapi-pagination/issues/674#issuecomment-1551275725

@lqmanh Could you try to change your query to: ```py stmt = ( select(Item) .join(Item.status) .join(Item.documents) .options( contains_eager(Item.status), selectinload(Item.documents), # use selectinload() to load all documents ) ) ```

@lqmanh If you have your relationship configured correctly, it will be done automatically

@lqmanh Could you please config like this: ```py from __future__ import annotations from operator import and_ from typing import Any from uuid import UUID, uuid4 from sqlalchemy import ForeignKey, create_engine,...

@lqmanh Or you can try this config: ```py from __future__ import annotations from operator import and_ from typing import Any from uuid import UUID, uuid4 from sqlalchemy import ForeignKey, create_engine,...

Hi all, Sorry for the long response. Unfortunately, we can't fix this issue using distinct count cause it will break the way pagination works. You need to play around with...

Hi @13129, Sorry for long response. Could you please try to update `pagination_ctx` call to: ```py #router get all @router.get(path='', dependencies=[Depends(pagination_ctx(Page[JobCateSchema]))], response_model=RestfulModel) async def ov_job_cate_get_all(session=Depends(router.db_func)): query = select(JobCategory).order_by(JobCategory.id) result =...