An additional requirement for assignments is to keep status history, so we can see "assignment 1 was active mon-wed, standby thu-fri then active again" etc.
As for the query, yes that was my initial idea but I thought it was going to be inefficient for times when I wanted to query for all assignments in a current status. So essentially we have: 'Load all assignments into Django. Loop through each one doing a "select top record from assignment_update where assignment_id = this assignment", add it to a list of matched_assignments then pass back to the caller to display" Where what I'm trying to ask the database for is: "Group all assignment updates by assignment and select the one with the latest date and status X, giving me the assignment id from this record back so I can load it into a list of filtered assignments without looking at each one in turn". Does that make sense? Mountain out of molehill you think? Interesting anyway, right? ;) Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/EW_igFGqE1sJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.