Re: Lazy QuerySet command to get lists of objects and an attribute of a specific object

2013-04-23 Thread Moon Limb
Dear Richard, Thank you for your feedback. So there are multiple stage types associated with a sample, and I plan to check a priori whether a sample has no stage types associated (whether equivalent to a user-defined null case). But for each stage type, it is not exceptional to have no stages.

Re: Lazy QuerySet command to get lists of objects and an attribute of a specific object

2013-04-23 Thread Richard Jelte
> But latest() raises DoesNotExist error if sample does not have any > stages. Without using latest() and thus not > having to write try/ catch, what is a good way to do this? Default values > for the list of stages and the status are [] and None, respectively. > I understand not wanting to wr

Re: lazy queryset

2011-10-25 Thread druce
Thanks Karen, I set DATABASES = { 'default': { 'OPTIONS': {'init_command': 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED'}, } } At first glance it seemed to do the trick. In fact it seemed to force the re-query every time I did .filter, without putting the QuerySet into

Re: lazy queryset

2011-10-25 Thread Karen Tracey
On Tue, Oct 25, 2011 at 7:39 PM, druce wrote: > Tried every other way I could think of. Any idea what I have to do to > force it to requery the database? > Sounds like you are a victim of the default REPEATABLE READ MySQL/InnoDB transaction isolation level. See this ticket for more details: htt