This is more of an implementation question than a
troubleshooting question. Also, since I've been unable to find any
documentation on this I was wondering if anyone has come across
this behavior or found a bug with it.
Yesterday I was working on an application to explore some
proof of concept aspects of Flex for an application I'm developing.
I started running into a problem with Flex Data Services throwing
back an 'Unknown Property: "clientaddress1"' error whenever I tried
to update data. It seemed that whenever I tried to update a record
in the database it would thrown the Unknown Property error. I spent
a good chunk of the day trying to figure out what was causing this
and finally gave up and called it a day.
This morning I was reassessing what the problem was and
trying to find the differences between my database and my code and
I stumbled upon the fact that I could add no records and modify
them without a problem, however if I tried to access an existing
record and update it I'd get the Unknown Property error.
I start analyzing the database and found that I'd configured
the database to use null values for empty values and the records
that I created with the database had null values, however, any of
the values inserted from Flex were inserted as blank values. As
matching my action script class as clientaddress1 = ""; So, upon
further testing I fould that Flex was not processing the null
values correctly, so that when it came back and rightly generated a
Conflict Error...and then called AcceptServer() it was unable to
find the clientaddress1 property of the class.
Also, if any of the properties in the database are null it
throws the same error. Basically it seems to have invalidated the
object just because one value was null. So if all of my values from
the DB are set to something and only one field is set to null it's
still throwing the error on the first alphabetical item of the
properties.
I can resolve the problem by not using null values in the
database, but...what sort of effect would this have on someone
working with a large legacy database that extensively uses nulls
for undefined values?
Also, if a Flex guru could explain the reasoning for this
happening I would greatly appreciate it!
Best regards,
Chris Maloney