0 Replies Latest reply on Feb 20, 2008 1:10 AM by GonzalesDK

    java Long -> Number conversion/Serialization

    GonzalesDK
      Hello.
      I have a really big problem which is the serialization of Number > Long and Long --> Number data types. I have a java object that contains a Long ID attribute. The id is the database identifier and it could for instance be 200801171410501446. Our id's are generated and will always be 18 digits long. The java object is mapped to a AS object and the id attribute in the AS object is a Number data type. The really weird thing is that once Flex does it's data type conversion, the value of the ID's don't match anymore. The Java Long value is :200801171410501446 and the Number value becomes: 200801171410501440. I really can't seem to figure out why this is happening. The pattern seems to be that once the Java attribute value becomes more than 16 digits, flex does some weird stuff with the remaining digits.

      Anyone has a clue what goes on here ?

      I did solve it temporarily by changing the ID to a String but that sucks because sorting in the datagrid doesn't work properly now.