0 Replies Latest reply on Nov 5, 2007 1:25 PM by jkahn117

    Data service complex object deserialization

    jkahn117
      I am building a simple data services application that has a many-to-one association between two classes:

      public class Product {
      public var title : String;
      }

      public class LineItem {
      public var product : Product

      public get function title() : String { return this.product.title; }
      }

      I am trying to populate a DataGrid with a list of LineItems, using the product's title in one of the fields. It seems, however, that the LineItem product property is populated with an Object, not a Product when returning from the DataService call. From I have read (see #9), this seems to be expected based on how the Flash player deserializes data.

      My question though is if there is an easy work around for this problem? Thus far, all I have found that works is to access a LineItem from the DataService result after it completes, but that seems very hack-ish to me.

      Thanks,
      Josh