Skip to content

Commit

Permalink
Merge pull request #30 from dreamfactorysoftware/date-filter-issue
Browse files Browse the repository at this point in the history
date filter not working correctly
  • Loading branch information
Anas authored Oct 23, 2023
2 parents 54b1549 + 8ef2931 commit 2dbc35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resources/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ protected static function toMongoObjects($record)
if (is_string($data) && (static::DEFAULT_ID_FIELD == $key)) {
$record[$key] = static::idToMongoId($data);
} elseif (is_array($data)) {
if (1 === count($data)) {
// if (1 === count($data)) {
// using typed definition, i.e. {"$date" : "2014-08-02T08:40:12.569Z" }
if (array_key_exists('$date', $data)) {
$temp = $data['$date'];
Expand All @@ -722,7 +722,7 @@ protected static function toMongoObjects($record)
} else {
$record[$key] = static::toMongoObjects($data);
}
}
// }
}
}
}
Expand Down

0 comments on commit 2dbc35a

Please sign in to comment.