Issue while selecting Foreign Key data with select_related #785
Unanswered
goyalshashank
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to implement pagination in GET APIs. While using select related with pagination query an error "function min(uuid) does not exist". I am using UUID as the primary key in my model.
filterQ = Model.objects.filter(model_2_uuid=uuid)
totalRecords = await filterQ.count()
if limit:
filterQ = filterQ.paginate(page, limit)
data = await filterQ.select_related(['model_2_uuid']).all()
ERROR :: **function min(uuid) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts. **
Beta Was this translation helpful? Give feedback.
All reactions