swisscom/cleanerversion — pull request #17 by brki (2014-10-17 09:27:24+00:00)
Title: Only use query_time when it has explicitly been set via as_of

I propose that we change how query_time is handled.

Up until now, code like:
```
# Authors.books is a many-to-many relationship
Authors.objects.create(name="Joe")
a1 = Authors.objects.current(name="Joe")
book = Books.objects.create(name="The love life of beetles")
a1.books.add(book)
print a1.books.all().count()
```
would print out "0", because when a1 was fetched, it's query_time was set to the time the fetch query was made.

What I'm proposing, is that an object that is fetched via objects.current, or has had it's as_of time explicitly set to None, will reflect the ongoing current state, not the state at the time when the object was fetched.

I propose this for two reasons:
1) It makes more sense to me.
2) It helps another pull request I'll make work. The other pull request deals with adding multiple objects at once to a many-to-many relationship (e.g. a1.books.add(book1, book2, book3)).