Re: problem with objects.get(id=None)

2010-03-06 Thread Karen Tracey
On Sat, Mar 6, 2010 at 7:46 PM, Ilya Braude wrote: > So perhaps a section in the documentation that talks about known quirks of > the various DB backends could help many people. > http://docs.djangoproject.com/en/1.1/ref/databases/#ref-databases Alternatively, there are

Re: problem with objects.get(id=None)

2010-03-06 Thread Ilya Braude
Masklinn wrote: On 6 Mar 2010, at 05:43 , Ilya Braude wrote: Karen Tracey wrote: I'm guessing you are using MySQL That's just how it behaves, by default. See: http://dev.mysql.com/doc/refman/5.1/en/server-session-variables.html#sysvar_sql_auto_is_null Wow, thanks. I now see

Re: problem with objects.get(id=None)

2010-03-06 Thread Matthew Warren
I guess the aim of documaentation is to be helpful and assist the end user. While it makes no sense to document mysql within Django, wouldn't it make sense to document specific interactions between Django and it's supported back-end DB's that are likely to catch people out? - maybe just as

Re: problem with objects.get(id=None)

2010-03-06 Thread Masklinn
On 6 Mar 2010, at 05:43 , Ilya Braude wrote: > > Karen Tracey wrote: >> I'm guessing you are using MySQL That's just how it behaves, by default. See: >> >> http://dev.mysql.com/doc/refman/5.1/en/server-session-variables.html#sysvar_sql_auto_is_null > > Wow, thanks. I now see that this has been

Re: problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
Karen Tracey wrote: I'm guessing you are using MySQL That's just how it behaves, by default. See: http://dev.mysql.com/doc/refman/5.1/en/server-session-variables.html#sysvar_sql_auto_is_null Wow, thanks. I now see that this has been brought up a few times before. This MySQL behavior

Re: problem with objects.get(id=None)

2010-03-05 Thread Karen Tracey
I'm guessing you are using MySQL That's just how it behaves, by default. See: http://dev.mysql.com/doc/refman/5.1/en/server-session-variables.html#sysvar_sql_auto_is_null Karen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
Ilya Braude wrote: Hello! I've run into a problem when calling .get on a related field manager with id = None. As far as I understand, doing an objects.get(id=None) should throw a DoesNotExist exception. However, it seems that there is some caching going on, as demonstrated in this trivial

problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
Hello! I've run into a problem when calling .get on a related field manager with id = None. As far as I understand, doing an objects.get(id=None) should throw a DoesNotExist exception. However, it seems that there is some caching going on, as demonstrated in this trivial example: