Yes. The filter method returns a queryset which is a lazy database object that will query the database to get the queryset. You would have to save the object for the queryset to return it. You could however get all of the objects which are not your select objects
MyModel.objects.exclude(pk__in=iterable_of_in_memory_pks_not_to_be_returned) On Apr 23, 3:15 pm, Margie Roginski <margierogin...@yahoo.com> wrote: > I have a situation where I have a handle to a db object and I've > modified a field in it. Then I later end up executing a filter that > finds that same object (among others) and saves all of the objects it > finds. In this situation the modified fields do not get saved out. > It's like the filter is getting the object directly from the database, > as opposed to getting the object that is in memory and modified (but > not yet saved). > > Is this the expected behavior? > > Margie > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.