Suriya wrote:
> This returns the list of rows in table A that have status > in table B set to 1 at some point in the past. What I want > is the latest status from table B. I see. Yes, you can either use a (grouping) custom SQL query or refactor. How I would do it is to have just one model (B) and an optional foreignkey to self which indicates this has been replaced. If the FK is blank, it is a current object (otherwise it is a historical object) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---