You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a use case to help us understand your request in context.
The front end wants to be able to sort a person's voting record by vote datetime.
Solution
Please describe your ideal solution.
Alternatives
Please describe any alternatives you've considered, even if you've dismissed them.
The text was updated successfully, but these errors were encountered:
I can look into it, but I need to understand something:Vote has a reference to Event, and Event has a datetime. Does this satisfy the requirement for having datetime accessible from Vote?
Vote has a reference to Event, and Event has a datetime. Does this satisfy the requirement for having datetime accessible from Vote?
It would, but the query to sort/filter a person's votes by the event's datetime would be inefficient, as the query would need to populate/fill in the Event for each Vote. Sorting/filtering votes by the event's datetime would force us to fetch all votes and populate the Event reference field for each vote(populating is just making a request to the database to fill in the reference field) and currently the database only allows a limited number of concurrent requests ( we have to make concurrent requests or the page will have high latency).
Agree with To's writeup. The Vote having a reference to Event is not enough. For faster querying and direct filtering we need the vote_datetime on the Vote model.
Feature Description
A clear and concise description of the feature you're requesting.
Add vote datetime field to the vote DB model
https://github.com/CouncilDataProject/cdp-backend/blob/main/cdp_backend/database/models.py#L698
Use Case
Please provide a use case to help us understand your request in context.
The front end wants to be able to sort a person's voting record by vote datetime.
Solution
Please describe your ideal solution.
Alternatives
Please describe any alternatives you've considered, even if you've dismissed them.
The text was updated successfully, but these errors were encountered: