Hi, it's me again...
By the way, is there any chance we arrive at this switch statement?=20
because I guess that in this case the value pointed to by the row is=20
already NULL?
To be more clear, before entering the switch statement which is=20
responsible for mapping mysql objects to Cocoa, I check if the present=20=
value is not NULL (in which I do NOT perform the switch, but gives a=20
NSNull).
Obviously, you arrive at this stage (where field_type =3D NULL but the=20=
corresponding value is NOT NULL), can you tell the case where it=20
happens?
Thanks in advance.
Serge.
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
>
|