Fixato dao per gestire MongoDate
This commit is contained in:
@@ -71,7 +71,7 @@ abstract class DaoSaveableDefaultImplementation implements DaoSaveable {
|
||||
private function toArray($input){
|
||||
$rval = $input;
|
||||
if (is_object($rval) ){
|
||||
if (!($rval instanceof MongoId)){
|
||||
if (!($rval instanceof MongoId) && !($rval instanceof MongoDate) ){
|
||||
$rval = (array)$input;
|
||||
}
|
||||
// $rval = (array)$input;
|
||||
@@ -118,7 +118,7 @@ abstract class DaoSaveableDefaultImplementation implements DaoSaveable {
|
||||
}
|
||||
}
|
||||
else if (is_object($rval)) {
|
||||
if (!($rval instanceof MongoId)){
|
||||
if (!($rval instanceof MongoId) && !($rval instanceof MongoDate)){
|
||||
foreach ( $rval as $key=>$val){
|
||||
$rval->$key = $this->toObject($val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user