Nullable objects Not NULL

Dec 3, 2010 at 7:30 PM

I have an odata.svc that is talking to an SQL Server database. My client in this instance that I am accessing the OData.svc is an IPad application.

The problem I am having is that it seems that the Obj-c Odata sdk doesnt know how to treat nullable fields in the odata service.

e.g. In my IPad I am creating a Customer record, on the customer record there is a nullable int field for DepartmentID which is a foreign key to the Department Table. When I create the customer record on the IPad i dont want to set the deparmentID in this situation. So when I save changes on the IPad I expect the Customer record should be created and the DepartmentID should be null. NO. The Obj-c OData sdk seems to want to send 0 instead of Null/Nothing to be populated into this field. I end up getting a foreign key error because there is not Department with a DepartmentID of 0.

This seems to be the same with all nullable database types (nullable dates get set to 01/01/01 0001, decimals get set to 0 etc etc)

Any ideas?


Mar 12, 2011 at 1:37 AM

This is fixed in Version 1.2.