title: using RestKit to serialize an object with a subobject [POSTing]
body: <p>I have the following objects setup:</p>
  
  <pre><code>RKObjectMapping* geoPointMapping = [RKObjectMapping mappingForClass:[CRGeoPoint class]];
  
  geoPointMapping.setDefaultValueForMissingAttributes = YES;
  [geoPointMapping mapKeyPathsToAttributes:
      @"longitude", @"longitude",
      @"latitude", @"latitude",
      nil];
  [objectManager.mappingProvider registerMapping:geoPointMapping withRootKeyPath:@"geometry"];
  
  RKObjectMapping* criteriaMapping = [RKObjectMapping mappingForClass:[CRCriteria class]];
  
  criteriaMapping.setDefaultValueForMissingAttributes = YES;
  [criteriaMapping mapKeyPathsToAttributes:
      @"type", @"type",
      @"geometry", @"geometry",
      @"fromDate", @"fromDate",
      @"toDate", @"toDate",
      @"radius", @"radius",
      nil];
  [objectManager.mappingProvider registerMapping:criteriaMapping withRootKeyPath:@"criteria"];
  </code></pre>
  
  <p>But when I try and send the query (with a geometry object). I keep
  getting this error:</p>
  
  <blockquote>
    <p>error received Error Domain=JKErrorDomain Code=-1 "Unable to serialize
    object class CRGeoPoint."</p>
  </blockquote>