Simon – agreed.  I just took the code from above (line 111) ;  We should change in both places if we change here.

 

From: Simon JAILLET [mailto:notifications@github.com] 
Sent: Saturday, March 16, 2013 5:08 PM
To: UnionOfRAD/lithium
Cc: Dan Fellars
Subject: Re: [lithium] if document schema changes from something to a DocumentSet, now exporter... (#857)

 

In data/source/mongo_db/Exporter.php:

> @@ -121,11 +121,11 @@ protected static function _update($export) {
>                      if ($isArray) {
>                              $newValue = $value->to('array', $options);
>                              $originalValue = null;
> -                            if (isset($original[$key])) {
> +                            if (isset($original[$key]) && is_object($original[$key]) && get_class($original[$key]) === static::$_classes['set']) {

Is if (isset($original[$key]) && ($original[$key] instanceof static::$_classes['set'] || $original[$key] instanceof static::$_classes['entity']) wouldn't be considered to be more generic ?

—
Reply to this email directly or view it on GitHub <https://github.com/UnionOfRAD/lithium/pull/857/files#r3404191> .  <https://github.com/notifications/beacon/8N2Ngwp4E4s46ItXC5cbBuyZJOZ0Dvi0sTIrjXTge30qE01zrGKERSdzpocAT3Bc.gif>