[Mysql-cocoa-users] =?ISO-8859-1?Q?R=E9p_:_[Mysql-cocoa-users]_nil_and_NSNull?=
Brought to you by:
sergecohen
|
From: Serge C. <ser...@us...> - 2003-01-16 12:24:55
|
Hi Camille, I never realise that I wrote that... Indeed the problem showed off when a field which of type not null is=20 set to a value of null, but I never realised that field type in itself=20= can be null. Thanks to point me this error. Serge. PS: I'll correct that in the CVS now, I'll try to update the download=20 files soon. Le jeudi, 16 jan 2003, =E0 12:01 Europe/Amsterdam, Camille=20 Goureau-Suignard a =E9crit : > Hi, > > SMySQl has a problem with fetchRowAsDictionnay. > If the field returned by the query is null (MySQL accepts this), the=20= > function has a problem. > A NSArray or NSDictionnay may not be populated with nil objects. > > it seems easy to change SMySQL to get him send back a valid=20 > NSDictionnary that has null fields : NSNull. > > in the file : SMySQLResult.m > > - (NSDictionary *)fetchRowAsDictionary > [..] > case FIELD_TYPE_NULL: > theCurrentObj =3D nil ; > break; > [...] > > change the "nil" by "[NSNull null]" to get : theCurrentObj =3D = [NSNull=20 > null] ; > > did I make a mistake ? > > Camille > |