hasMany relationship was broken

During serializing object, object with `hasMany` were not getting serialized. Small fix is required. Hope this helps.